-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: update Badge component * refactor: update Box component * refactor: update Button component * refactor: update Chips component * refactor: update Collapsable component * refactor: update DatePicker component * refactor: update Drawer component * refactor: update DropZone component * refactor: update Flex component * refactor: update Grid component * refactor: update Heading component * refactor: update InfoBox component * refactor: update Notification component * refactor: update Page component * refactor: update ProgressBar component * refactor: update Radio component * refactor: update Select component * refactor: update TabBar component * refactor: update Table component * refactor: update TableBatchActions component * refactor: update TableCheckbox component * refactor: update TableEditableCell component * refactor: update TablePagination component * refactor: update Text component * refactor: update PolyThemeProvider component * fix: set children as any in Tooltip component * refactor: update ProfilePicture and SelectCard component
- Loading branch information
1 parent
2319928
commit f97aefd
Showing
29 changed files
with
259 additions
and
242 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
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,25 +1,26 @@ | ||
import { FC } from 'react'; | ||
import { PropsWithChildren } from 'react'; | ||
import styled from 'styled-components'; | ||
import { Flex } from '../Flex'; | ||
|
||
export type ChipsVariant = 'default'; | ||
|
||
export type ChipsProps = { | ||
export type ChipsProps = PropsWithChildren<{ | ||
text: string; | ||
number: number; | ||
variant: 'default'; | ||
}; | ||
}>; | ||
|
||
const Component = styled(Flex)<any>(({ theme, variant }) => ({ | ||
...(theme.CHIPS[variant] || {}), | ||
})); | ||
|
||
export const Chips: FC<ChipsProps> = (props) => { | ||
const { text, number } = props; | ||
export function Chips(chipsProps: ChipsProps) { | ||
const { text, number, ...props } = chipsProps; | ||
|
||
return ( | ||
<Component {...props}> | ||
{text} | ||
<div className="number">{number}</div> | ||
</Component> | ||
); | ||
}; | ||
} |
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
Oops, something went wrong.