-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: ion tab group with styled-components
- Loading branch information
1 parent
b0cff6b
commit 2a6b22b
Showing
4 changed files
with
34 additions
and
214 deletions.
There are no files selected for viewing
160 changes: 0 additions & 160 deletions
160
src/components/tabGroup/__snapshots__/tabGroup.test.tsx.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,15 @@ | ||
import stitches from '../../stitches.config'; | ||
|
||
const { styled } = stitches; | ||
|
||
export const TabGroupStyles = styled('div', { | ||
display: 'flex', | ||
|
||
div: { | ||
display: 'flex', | ||
}, | ||
|
||
variants: { | ||
align: { | ||
horizontal: { | ||
div: { | ||
flexDirection: 'row', | ||
}, | ||
}, | ||
vertical: { | ||
width: '100%', | ||
|
||
div: { | ||
flexDirection: 'column', | ||
textAlign: 'left', | ||
'button > div': { | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
import { css, styled } from 'styled-components'; | ||
import { TabAlign } from './tabGroup'; | ||
|
||
type TabGroupStylesProps = { | ||
align: TabAlign; | ||
}; | ||
|
||
export const TabGroup = styled.div<TabGroupStylesProps>` | ||
${({ align }) => | ||
css` | ||
display: flex; | ||
flex-direction: ${align === 'horizontal' ? 'row' : 'column'}; | ||
width: max-content; | ||
`} | ||
`; |
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