Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Accordion): migrate to tailwind
- Loading branch information
Showing
9 changed files
with
43 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Accordion: false | ||
Accordion: true | ||
AirportIllustration: true | ||
Alert: true | ||
AlertButton: true | ||
|
14 changes: 3 additions & 11 deletions
14
packages/orbit-components/src/Accordion/AccordionSection/components/SectionContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
import defaultTheme from "../../../defaultTheme"; | ||
import type * as Common from "../../../common/types"; | ||
|
||
const StyledWrapper = styled.div` | ||
padding: ${({ theme }) => `0 ${theme.orbit.spaceLarge} ${theme.orbit.spaceLarge}`}; | ||
`; | ||
|
||
StyledWrapper.defaultProps = { | ||
theme: defaultTheme, | ||
}; | ||
|
||
interface Props extends Common.Globals { | ||
children: React.ReactNode; | ||
} | ||
|
||
const AccordionSectionContent = ({ children, dataTest }: Props) => ( | ||
<StyledWrapper data-test={dataTest && `${dataTest}Content`}>{children}</StyledWrapper> | ||
<div className="px-lg pb-lg" data-test={dataTest && `${dataTest}Content`}> | ||
{children} | ||
</div> | ||
); | ||
|
||
export default AccordionSectionContent; |
23 changes: 6 additions & 17 deletions
23
packages/orbit-components/src/Accordion/AccordionSection/components/SectionFooter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,18 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
import defaultTheme from "../../../defaultTheme"; | ||
import type * as Common from "../../../common/types"; | ||
|
||
const StyledWrapper = styled.div` | ||
display: flex; | ||
padding: ${({ theme }) => theme.orbit.spaceLarge}; | ||
background-color: ${({ theme }) => theme.orbit.paletteWhite}; | ||
position: sticky; | ||
bottom: 0; | ||
box-sizing: border-box; | ||
box-shadow: ${({ theme }) => theme.orbit.boxShadowActionActive}; | ||
`; | ||
|
||
StyledWrapper.defaultProps = { | ||
theme: defaultTheme, | ||
}; | ||
|
||
interface Props extends Common.Globals { | ||
children: React.ReactNode; | ||
} | ||
|
||
const AccordionSectionFooter = ({ children, dataTest }: Props) => ( | ||
<StyledWrapper data-test={dataTest && `${dataTest}Footer`}>{children}</StyledWrapper> | ||
<div | ||
className="p-lg bg-white-normal shadow-action-active sticky bottom-0 flex" | ||
data-test={dataTest && `${dataTest}Footer`} | ||
> | ||
{children} | ||
</div> | ||
); | ||
|
||
export default AccordionSectionFooter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 0 additions & 50 deletions
50
packages/orbit-components/src/Accordion/components/AccordionWrapper/index.tsx
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/orbit-components/src/Accordion/components/AccordionWrapper/types.d.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters