-
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 (#145)
- Loading branch information
1 parent
3b4c2f9
commit 8305361
Showing
6 changed files
with
36 additions
and
216 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
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
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