@fountain-ui/core 3.0.0-alpha.1 → 3.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commonjs/Accordion/Accordion.js +4 -1
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/index.js +8 -0
- package/build/commonjs/Accordion/index.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +11 -10
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/AppBar/index.js +8 -0
- package/build/commonjs/AppBar/index.js.map +1 -1
- package/build/commonjs/Badge/index.js +26 -0
- package/build/commonjs/Badge/index.js.map +1 -1
- package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
- package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +1 -0
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/commonjs/Button/Button.js +15 -3
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/Button/ButtonProps.js +7 -7
- package/build/commonjs/Button/ButtonProps.js.map +1 -1
- package/build/commonjs/Button/index.js +20 -0
- package/build/commonjs/Button/index.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +5 -7
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Checkbox/Checkbox.js +5 -2
- package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/build/commonjs/Checkbox/index.js +8 -0
- package/build/commonjs/Checkbox/index.js.map +1 -1
- package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
- package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Chip/index.js +14 -0
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +2 -18
- package/build/commonjs/Chip/useChipStyle.js.map +1 -1
- package/build/commonjs/Dialog/index.js +8 -0
- package/build/commonjs/Dialog/index.js.map +1 -1
- package/build/commonjs/DialogContent/DialogContent.js +1 -2
- package/build/commonjs/DialogContent/DialogContent.js.map +1 -1
- package/build/commonjs/Divider/Divider.js +1 -1
- package/build/commonjs/Divider/Divider.js.map +1 -1
- package/build/commonjs/Divider/DividerProps.js +3 -3
- package/build/commonjs/Divider/DividerProps.js.map +1 -1
- package/build/commonjs/Divider/index.js +14 -0
- package/build/commonjs/Divider/index.js.map +1 -1
- package/build/commonjs/Empty/Empty.js +1 -2
- package/build/commonjs/Empty/Empty.js.map +1 -1
- package/build/commonjs/Flexbox/Flexbox.js +2 -0
- package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
- package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
- package/build/commonjs/IconButton/index.js +8 -0
- package/build/commonjs/IconButton/index.js.map +1 -1
- package/build/commonjs/ListItem/ListItem.js +47 -25
- package/build/commonjs/ListItem/ListItem.js.map +1 -1
- package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
- package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
- package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemText.js +20 -21
- package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
- package/build/commonjs/Pagination/NumberPagination.js +1 -1
- package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
- package/build/commonjs/Pagination/index.js +8 -0
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/Radio/Radio.js +6 -2
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/Section/Section.js +32 -0
- package/build/commonjs/Section/Section.js.map +1 -0
- package/build/commonjs/Section/SectionProps.js +2 -0
- package/build/commonjs/Section/SectionProps.js.map +1 -0
- package/build/commonjs/Section/index.js +16 -0
- package/build/commonjs/Section/index.js.map +1 -0
- package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
- package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
- package/build/commonjs/Snackbar/index.js +8 -0
- package/build/commonjs/Snackbar/index.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +27 -12
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/SvgIcon/index.js +14 -0
- package/build/commonjs/SvgIcon/index.js.map +1 -1
- package/build/commonjs/Tab/useVariantStyleMap.js +3 -3
- package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Tabs/Tabs.js +6 -1
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/index.js +14 -0
- package/build/commonjs/Tabs/index.js.map +1 -1
- package/build/commonjs/Tabs/useTabsStyle.js +39 -0
- package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
- package/build/commonjs/TextField/TextField.js +1 -1
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/index.js +8 -0
- package/build/commonjs/TextField/index.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +2 -2
- package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Toolbar/index.js +8 -0
- package/build/commonjs/Toolbar/index.js.map +1 -1
- package/build/commonjs/Tooltip/Beaks/index.js +32 -0
- package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
- package/build/commonjs/Tooltip/Tooltip.js +11 -24
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +39 -0
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/Typography/Typography.js +9 -2
- package/build/commonjs/Typography/Typography.js.map +1 -1
- package/build/commonjs/Typography/TypographyProps.js.map +1 -1
- package/build/commonjs/Typography/index.js +8 -0
- package/build/commonjs/Typography/index.js.map +1 -1
- package/build/commonjs/hooks/useBreakpointUp.js +4 -1
- package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
- package/build/commonjs/hooks/useContentContainerStyle.js +21 -28
- package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
- package/build/commonjs/index.js +21 -0
- package/build/commonjs/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +4 -1
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/index.js +1 -0
- package/build/module/Accordion/index.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +11 -10
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/module/AppBar/index.js +1 -0
- package/build/module/AppBar/index.js.map +1 -1
- package/build/module/Badge/index.js +1 -0
- package/build/module/Badge/index.js.map +1 -1
- package/build/module/Badge/useVariantStyleMap.js +2 -2
- package/build/module/Badge/useVariantStyleMap.js.map +1 -1
- package/build/module/BottomSheetTitle/BottomSheetTitle.js +1 -0
- package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/module/Button/Button.js +16 -4
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/Button/ButtonProps.js +3 -3
- package/build/module/Button/ButtonProps.js.map +1 -1
- package/build/module/Button/index.js +1 -0
- package/build/module/Button/index.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +5 -7
- package/build/module/Button/useVariantStyleMap.js.map +1 -1
- package/build/module/Checkbox/Checkbox.js +5 -2
- package/build/module/Checkbox/Checkbox.js.map +1 -1
- package/build/module/Checkbox/index.js +1 -0
- package/build/module/Checkbox/index.js.map +1 -1
- package/build/module/Checkbox/useVariantStyleMap.js +6 -2
- package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/module/Chip/index.js +1 -0
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +2 -17
- package/build/module/Chip/useChipStyle.js.map +1 -1
- package/build/module/Dialog/index.js +1 -0
- package/build/module/Dialog/index.js.map +1 -1
- package/build/module/DialogContent/DialogContent.js +1 -2
- package/build/module/DialogContent/DialogContent.js.map +1 -1
- package/build/module/Divider/Divider.js +1 -1
- package/build/module/Divider/Divider.js.map +1 -1
- package/build/module/Divider/DividerProps.js +1 -1
- package/build/module/Divider/DividerProps.js.map +1 -1
- package/build/module/Divider/index.js +1 -0
- package/build/module/Divider/index.js.map +1 -1
- package/build/module/Empty/Empty.js +1 -2
- package/build/module/Empty/Empty.js.map +1 -1
- package/build/module/Flexbox/Flexbox.js +2 -0
- package/build/module/Flexbox/Flexbox.js.map +1 -1
- package/build/module/Flexbox/FlexboxProps.js.map +1 -1
- package/build/module/IconButton/index.js +1 -0
- package/build/module/IconButton/index.js.map +1 -1
- package/build/module/ListItem/ListItem.js +45 -27
- package/build/module/ListItem/ListItem.js.map +1 -1
- package/build/module/ListItem/ListItemProps.js.map +1 -1
- package/build/module/ListItemIcon/ListItemIcon.js +1 -2
- package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/module/ListItemText/ListItemText.js +17 -19
- package/build/module/ListItemText/ListItemText.js.map +1 -1
- package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/module/ListSubheader/ListSubheader.js +1 -1
- package/build/module/ListSubheader/ListSubheader.js.map +1 -1
- package/build/module/Pagination/NumberPagination.js +1 -1
- package/build/module/Pagination/NumberPagination.js.map +1 -1
- package/build/module/Pagination/index.js +1 -0
- package/build/module/Pagination/index.js.map +1 -1
- package/build/module/Radio/Radio.js +5 -2
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/Section/Section.js +19 -0
- package/build/module/Section/Section.js.map +1 -0
- package/build/module/Section/SectionProps.js +2 -0
- package/build/module/Section/SectionProps.js.map +1 -0
- package/build/module/Section/index.js +2 -0
- package/build/module/Section/index.js.map +1 -0
- package/build/module/ShadowView/ShadowView.native.js +4 -0
- package/build/module/ShadowView/ShadowView.native.js.map +1 -1
- package/build/module/Snackbar/index.js +1 -0
- package/build/module/Snackbar/index.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +27 -12
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/SvgIcon/index.js +1 -0
- package/build/module/SvgIcon/index.js.map +1 -1
- package/build/module/Tab/useVariantStyleMap.js +3 -3
- package/build/module/Tab/useVariantStyleMap.js.map +1 -1
- package/build/module/Tabs/Tabs.js +5 -1
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/index.js +1 -0
- package/build/module/Tabs/index.js.map +1 -1
- package/build/module/Tabs/useTabsStyle.js +30 -0
- package/build/module/Tabs/useTabsStyle.js.map +1 -0
- package/build/module/TextField/TextField.js +1 -1
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/index.js +1 -0
- package/build/module/TextField/index.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +2 -2
- package/build/module/TextField/useVariantStyleMap.js.map +1 -1
- package/build/module/Toolbar/index.js +1 -0
- package/build/module/Toolbar/index.js.map +1 -1
- package/build/module/Tooltip/Beaks/index.js +4 -0
- package/build/module/Tooltip/Beaks/index.js.map +1 -1
- package/build/module/Tooltip/Tooltip.js +4 -16
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/index.js +2 -0
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/Typography/Typography.js +9 -2
- package/build/module/Typography/Typography.js.map +1 -1
- package/build/module/Typography/TypographyProps.js.map +1 -1
- package/build/module/Typography/index.js +1 -0
- package/build/module/Typography/index.js.map +1 -1
- package/build/module/hooks/useBreakpointUp.js +4 -1
- package/build/module/hooks/useBreakpointUp.js.map +1 -1
- package/build/module/hooks/useContentContainerStyle.js +23 -26
- package/build/module/hooks/useContentContainerStyle.js.map +1 -1
- package/build/module/index.js +2 -0
- package/build/module/index.js.map +1 -1
- package/build/typescript/Accordion/index.d.ts +1 -0
- package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/AppBar/index.d.ts +1 -0
- package/build/typescript/Badge/index.d.ts +2 -1
- package/build/typescript/Button/ButtonProps.d.ts +11 -6
- package/build/typescript/Button/index.d.ts +1 -0
- package/build/typescript/Checkbox/index.d.ts +1 -0
- package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/Chip/index.d.ts +1 -0
- package/build/typescript/Dialog/index.d.ts +1 -0
- package/build/typescript/Divider/DividerProps.d.ts +3 -3
- package/build/typescript/Divider/index.d.ts +1 -0
- package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
- package/build/typescript/IconButton/index.d.ts +1 -0
- package/build/typescript/ListItem/ListItem.d.ts +1 -1
- package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
- package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
- package/build/typescript/Pagination/index.d.ts +1 -0
- package/build/typescript/Section/Section.d.ts +3 -0
- package/build/typescript/Section/SectionProps.d.ts +6 -0
- package/build/typescript/Section/index.d.ts +2 -0
- package/build/typescript/Snackbar/index.d.ts +1 -0
- package/build/typescript/SvgIcon/index.d.ts +1 -0
- package/build/typescript/Tabs/index.d.ts +1 -0
- package/build/typescript/Tabs/useTabsStyle.d.ts +7 -0
- package/build/typescript/TextField/index.d.ts +1 -0
- package/build/typescript/Toolbar/index.d.ts +1 -0
- package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
- package/build/typescript/Tooltip/index.d.ts +3 -1
- package/build/typescript/Typography/TypographyProps.d.ts +4 -0
- package/build/typescript/Typography/index.d.ts +1 -0
- package/build/typescript/hooks/useContentContainerStyle.d.ts +4 -8
- package/build/typescript/index.d.ts +2 -0
- package/package.json +3 -3
- package/src/Accordion/Accordion.tsx +4 -1
- package/src/Accordion/index.ts +1 -0
- package/src/Accordion/useVariantStyleMap.ts +12 -10
- package/src/AppBar/index.ts +1 -0
- package/src/Badge/index.ts +12 -1
- package/src/Badge/useVariantStyleMap.ts +2 -2
- package/src/BottomSheetTitle/BottomSheetTitle.tsx +1 -0
- package/src/Button/Button.tsx +19 -4
- package/src/Button/ButtonProps.ts +12 -6
- package/src/Button/index.ts +1 -0
- package/src/Button/useVariantStyleMap.ts +3 -7
- package/src/Checkbox/Checkbox.tsx +12 -9
- package/src/Checkbox/index.ts +1 -0
- package/src/Checkbox/useVariantStyleMap.ts +6 -1
- package/src/Chip/index.ts +1 -0
- package/src/Chip/useChipStyle.ts +2 -17
- package/src/Dialog/index.ts +1 -0
- package/src/DialogContent/DialogContent.tsx +1 -2
- package/src/Divider/Divider.tsx +1 -1
- package/src/Divider/DividerProps.ts +3 -3
- package/src/Divider/index.ts +1 -0
- package/src/Empty/Empty.tsx +1 -2
- package/src/Flexbox/Flexbox.tsx +2 -0
- package/src/Flexbox/FlexboxProps.ts +5 -0
- package/src/IconButton/index.ts +1 -0
- package/src/ListItem/ListItem.tsx +69 -28
- package/src/ListItem/ListItemProps.ts +5 -0
- package/src/ListItemIcon/ListItemIcon.tsx +1 -2
- package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
- package/src/ListItemText/ListItemText.tsx +20 -28
- package/src/ListItemText/ListItemTextProps.ts +2 -10
- package/src/ListSubheader/ListSubheader.tsx +1 -1
- package/src/Pagination/NumberPagination.tsx +1 -1
- package/src/Pagination/index.ts +1 -0
- package/src/Radio/Radio.tsx +8 -2
- package/src/Section/Section.tsx +26 -0
- package/src/Section/SectionProps.ts +6 -0
- package/src/Section/index.ts +2 -0
- package/src/ShadowView/ShadowView.native.tsx +4 -0
- package/src/Snackbar/index.ts +1 -0
- package/src/SnackbarContent/SnackbarContent.tsx +37 -18
- package/src/SvgIcon/index.ts +1 -0
- package/src/Tab/useVariantStyleMap.ts +3 -3
- package/src/Tabs/Tabs.tsx +4 -0
- package/src/Tabs/index.ts +1 -0
- package/src/Tabs/useTabsStyle.ts +35 -0
- package/src/TextField/TextField.tsx +1 -1
- package/src/TextField/index.tsx +1 -0
- package/src/TextField/useVariantStyleMap.ts +2 -2
- package/src/Toolbar/index.ts +1 -0
- package/src/Tooltip/Beaks/index.ts +4 -0
- package/src/Tooltip/Tooltip.tsx +5 -16
- package/src/Tooltip/index.ts +3 -1
- package/src/Typography/Typography.tsx +3 -1
- package/src/Typography/TypographyProps.ts +5 -0
- package/src/Typography/index.ts +1 -0
- package/src/hooks/useBreakpointUp.ts +3 -1
- package/src/hooks/useContentContainerStyle.ts +26 -34
- package/src/index.ts +3 -0
- package/build/commonjs/TextField/InputLabel.js +0 -163
- package/build/commonjs/TextField/InputLabel.js.map +0 -1
- package/build/module/TextField/InputLabel.js +0 -149
- package/build/module/TextField/InputLabel.js.map +0 -1
- package/build/typescript/TextField/InputLabel.d.ts +0 -33
- package/src/TextField/InputLabel.tsx +0 -234
package/src/Button/Button.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Linking, Text } from 'react-native';
|
|
2
|
+
import { Linking, Text, View } from 'react-native';
|
|
3
3
|
import type { FontStyle, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
4
|
import { typographyOf } from '@fountain-ui/styles';
|
|
5
5
|
import ButtonBase from '../ButtonBase/ButtonBase';
|
|
@@ -10,7 +10,7 @@ import type ButtonProps from './ButtonProps';
|
|
|
10
10
|
import type { ButtonColor, ButtonSize, ButtonVariant } from './ButtonProps';
|
|
11
11
|
import useVariantStyleMap from './useVariantStyleMap';
|
|
12
12
|
|
|
13
|
-
type ButtonStyles = NamedStylesStringUnion<'root' | 'fullWidth' | 'large' | 'medium' | 'small' | 'loadingSpinner'>;
|
|
13
|
+
type ButtonStyles = NamedStylesStringUnion<'root' | 'fullWidth' | 'large' | 'medium' | 'small' | 'loadingSpinner' | 'iconContainer'>;
|
|
14
14
|
|
|
15
15
|
const useStyles: UseStyles<ButtonStyles> = function (): ButtonStyles {
|
|
16
16
|
const theme = useTheme();
|
|
@@ -21,6 +21,7 @@ const useStyles: UseStyles<ButtonStyles> = function (): ButtonStyles {
|
|
|
21
21
|
borderRadius: theme.shape.radius.sm,
|
|
22
22
|
flexDirection: 'row',
|
|
23
23
|
justifyContent: 'center',
|
|
24
|
+
minHeight: 32,
|
|
24
25
|
},
|
|
25
26
|
fullWidth: {
|
|
26
27
|
width: '100%',
|
|
@@ -45,6 +46,9 @@ const useStyles: UseStyles<ButtonStyles> = function (): ButtonStyles {
|
|
|
45
46
|
loadingSpinner: {
|
|
46
47
|
position: 'absolute',
|
|
47
48
|
},
|
|
49
|
+
iconContainer: {
|
|
50
|
+
paddingTop: 1,
|
|
51
|
+
},
|
|
48
52
|
};
|
|
49
53
|
};
|
|
50
54
|
|
|
@@ -82,6 +86,7 @@ export default function Button(props: ButtonProps) {
|
|
|
82
86
|
color: colorProp = 'primary' as ButtonColor,
|
|
83
87
|
disabled: disabledProp = false,
|
|
84
88
|
disableMinWidth = false,
|
|
89
|
+
disablePadding = false,
|
|
85
90
|
endIcon: endIconProp,
|
|
86
91
|
fullWidth = false,
|
|
87
92
|
href,
|
|
@@ -113,8 +118,17 @@ export default function Button(props: ButtonProps) {
|
|
|
113
118
|
opacity: isLoading ? 0 : 1,
|
|
114
119
|
};
|
|
115
120
|
|
|
116
|
-
const startIcon =
|
|
117
|
-
|
|
121
|
+
const startIcon = startIconProp ? (
|
|
122
|
+
<View style={styles.iconContainer}>
|
|
123
|
+
{cloneElementSafely(startIconProp, iconProps)}
|
|
124
|
+
</View>
|
|
125
|
+
) : null;
|
|
126
|
+
|
|
127
|
+
const endIcon = endIconProp ? (
|
|
128
|
+
<View style={styles.iconContainer}>
|
|
129
|
+
{cloneElementSafely(endIconProp, iconProps)}
|
|
130
|
+
</View>
|
|
131
|
+
) : null;
|
|
118
132
|
|
|
119
133
|
const buttonBaseStyle = css([
|
|
120
134
|
styles.root,
|
|
@@ -122,6 +136,7 @@ export default function Button(props: ButtonProps) {
|
|
|
122
136
|
styles[size],
|
|
123
137
|
fullWidth ? styles.fullWidth : undefined,
|
|
124
138
|
disableMinWidth ? { minWidth: 0 } : undefined,
|
|
139
|
+
disablePadding ? { paddingHorizontal: 0, paddingVertical: 0 } : undefined,
|
|
125
140
|
styleProp,
|
|
126
141
|
]);
|
|
127
142
|
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { ButtonBaseProps } from '../ButtonBase';
|
|
3
3
|
import type { OverridableComponentProps } from '../types';
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const buttonColors = [
|
|
6
6
|
'accent',
|
|
7
7
|
'primary',
|
|
8
8
|
'danger',
|
|
@@ -10,23 +10,23 @@ export const ButtonColors = [
|
|
|
10
10
|
'secondary',
|
|
11
11
|
'accentAlt',
|
|
12
12
|
] as const;
|
|
13
|
-
export type ButtonColor = typeof
|
|
13
|
+
export type ButtonColor = typeof buttonColors[number];
|
|
14
14
|
|
|
15
|
-
export const
|
|
15
|
+
export const buttonSizes = [
|
|
16
16
|
'small',
|
|
17
17
|
'medium',
|
|
18
18
|
'large',
|
|
19
19
|
] as const;
|
|
20
|
-
export type ButtonSize = typeof
|
|
20
|
+
export type ButtonSize = typeof buttonSizes[number];
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const buttonVariants = [
|
|
23
23
|
'solid',
|
|
24
24
|
'outlined',
|
|
25
25
|
'text',
|
|
26
26
|
'capsuleSolid',
|
|
27
27
|
'capsuleOutlined',
|
|
28
28
|
] as const;
|
|
29
|
-
export type ButtonVariant = typeof
|
|
29
|
+
export type ButtonVariant = typeof buttonVariants[number];
|
|
30
30
|
|
|
31
31
|
export default interface ButtonProps extends OverridableComponentProps<ButtonBaseProps, {
|
|
32
32
|
/**
|
|
@@ -46,6 +46,12 @@ export default interface ButtonProps extends OverridableComponentProps<ButtonBas
|
|
|
46
46
|
*/
|
|
47
47
|
disableMinWidth?: boolean;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Determines whether padding should be applied.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
disablePadding?: boolean;
|
|
54
|
+
|
|
49
55
|
/**
|
|
50
56
|
* Element placed after the children.
|
|
51
57
|
*/
|
package/src/Button/index.ts
CHANGED
|
@@ -59,9 +59,7 @@ export default function useVariantStyleMap(variant: ButtonVariant, color: Button
|
|
|
59
59
|
borderColor: palette.border.accent,
|
|
60
60
|
borderWidth: 1,
|
|
61
61
|
},
|
|
62
|
-
labelColor:
|
|
63
|
-
// TODO: change color.
|
|
64
|
-
// labelColor: palette.text.accent,
|
|
62
|
+
labelColor: palette.text.accent,
|
|
65
63
|
iconColor: palette.icon.accent,
|
|
66
64
|
},
|
|
67
65
|
primary: {
|
|
@@ -91,9 +89,7 @@ export default function useVariantStyleMap(variant: ButtonVariant, color: Button
|
|
|
91
89
|
iconColor: palette.icon.base,
|
|
92
90
|
},
|
|
93
91
|
accent: {
|
|
94
|
-
labelColor:
|
|
95
|
-
// TODO: change color.
|
|
96
|
-
// labelColor: palette.text.accent,
|
|
92
|
+
labelColor: palette.text.accent,
|
|
97
93
|
iconColor: palette.icon.accent,
|
|
98
94
|
},
|
|
99
95
|
accentAlt: {
|
|
@@ -173,7 +169,7 @@ export default function useVariantStyleMap(variant: ButtonVariant, color: Button
|
|
|
173
169
|
},
|
|
174
170
|
};
|
|
175
171
|
|
|
176
|
-
if (variantStyleMap[variant][color]) {
|
|
172
|
+
if (variantStyleMap[variant]?.[color]) {
|
|
177
173
|
return variantStyleMap[variant][color] as UseVariantStyleMapReturns;
|
|
178
174
|
}
|
|
179
175
|
|
|
@@ -22,6 +22,7 @@ export default function Checkbox(props: CheckboxProps) {
|
|
|
22
22
|
const theme = useTheme();
|
|
23
23
|
|
|
24
24
|
const {
|
|
25
|
+
checkboxContainerStyle,
|
|
25
26
|
checkboxStyle,
|
|
26
27
|
containerStyle,
|
|
27
28
|
iconColor,
|
|
@@ -33,7 +34,7 @@ export default function Checkbox(props: CheckboxProps) {
|
|
|
33
34
|
]);
|
|
34
35
|
|
|
35
36
|
const fontStyle = createFontStyle(theme, {
|
|
36
|
-
|
|
37
|
+
selector: (typography) => typography.body2.regular,
|
|
37
38
|
color: theme.palette.text.strong,
|
|
38
39
|
});
|
|
39
40
|
|
|
@@ -50,14 +51,16 @@ export default function Checkbox(props: CheckboxProps) {
|
|
|
50
51
|
style={rootStyle}
|
|
51
52
|
{...otherProps}
|
|
52
53
|
>
|
|
53
|
-
<View style={
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
<View style={checkboxContainerStyle}>
|
|
55
|
+
<View style={checkboxStyle}>
|
|
56
|
+
{checked ? (
|
|
57
|
+
<CheckboxOnIcon
|
|
58
|
+
fill={iconColor}
|
|
59
|
+
height={7.5}
|
|
60
|
+
width={11}
|
|
61
|
+
/>
|
|
62
|
+
) : null}
|
|
63
|
+
</View>
|
|
61
64
|
</View>
|
|
62
65
|
|
|
63
66
|
{children ? (
|
package/src/Checkbox/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ const styles = StyleSheet.create({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
type useVariantStyleMapReturns = {
|
|
15
|
+
checkboxContainerStyle?: FountainUiStyle;
|
|
15
16
|
checkboxStyle?: FountainUiStyle;
|
|
16
17
|
containerStyle?: FountainUiStyle;
|
|
17
18
|
iconColor?: string;
|
|
@@ -23,6 +24,10 @@ export default function useVariantStyleMap(variant: CheckboxVariant, checked: bo
|
|
|
23
24
|
switch (variant) {
|
|
24
25
|
case 'square':
|
|
25
26
|
return {
|
|
27
|
+
checkboxContainerStyle: {
|
|
28
|
+
alignSelf: 'flex-start',
|
|
29
|
+
paddingTop: 3,
|
|
30
|
+
},
|
|
26
31
|
checkboxStyle: css([
|
|
27
32
|
styles.checkbox,
|
|
28
33
|
{
|
|
@@ -37,9 +42,9 @@ export default function useVariantStyleMap(variant: CheckboxVariant, checked: bo
|
|
|
37
42
|
},
|
|
38
43
|
]),
|
|
39
44
|
containerStyle: {
|
|
40
|
-
alignItems: 'center',
|
|
41
45
|
flexDirection: 'row',
|
|
42
46
|
gap: theme.spacing(3),
|
|
47
|
+
paddingVertical: theme.spacing(2),
|
|
43
48
|
},
|
|
44
49
|
iconColor: theme.palette.fill.baseAlt,
|
|
45
50
|
};
|
package/src/Chip/index.ts
CHANGED
package/src/Chip/useChipStyle.ts
CHANGED
|
@@ -3,7 +3,6 @@ import type { TextStyle } from 'react-native';
|
|
|
3
3
|
import type { FountainUiStyle } from '@fountain-ui/styles';
|
|
4
4
|
import { createFontStyle, useTheme } from '../styles';
|
|
5
5
|
import type { ChipSize, ChipStartElementVariant } from './ChipProps';
|
|
6
|
-
import { typographyOf } from '@fountain-ui/styles';
|
|
7
6
|
|
|
8
7
|
interface ChipStyle {
|
|
9
8
|
container: FountainUiStyle;
|
|
@@ -25,25 +24,11 @@ export default function useChipStyle(
|
|
|
25
24
|
return useMemo<ChipStyle>(() => {
|
|
26
25
|
const fontStyleMap: Record<ChipSize, TextStyle> = {
|
|
27
26
|
small: createFontStyle(theme, {
|
|
28
|
-
|
|
29
|
-
// selector: (typography) => typography.caption1.medium,
|
|
30
|
-
selector: (_) => typographyOf({
|
|
31
|
-
fontSize: 12,
|
|
32
|
-
lineHeight: 16.8,
|
|
33
|
-
fontFamily: 'Pretendard-Medium',
|
|
34
|
-
letterSpacing: 0,
|
|
35
|
-
}),
|
|
27
|
+
selector: (typography) => typography.caption1.medium,
|
|
36
28
|
color: theme.palette.text.strong,
|
|
37
29
|
}),
|
|
38
30
|
large: createFontStyle(theme, {
|
|
39
|
-
|
|
40
|
-
// selector: (typography) => typography.body2.medium,
|
|
41
|
-
selector: (_) => typographyOf({
|
|
42
|
-
fontSize: 14,
|
|
43
|
-
lineHeight: 21,
|
|
44
|
-
fontFamily: 'Pretendard-Medium',
|
|
45
|
-
letterSpacing: 0,
|
|
46
|
-
}),
|
|
31
|
+
selector: (typography) => typography.body2.medium,
|
|
47
32
|
color: theme.palette.text.strong,
|
|
48
33
|
}),
|
|
49
34
|
};
|
package/src/Dialog/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default } from './Dialog';
|
|
2
2
|
export type { default as DialogProps } from './DialogProps';
|
|
3
|
+
export { dialogSizes } from './DialogProps';
|
|
3
4
|
export { DialogProvider, useDialogContext } from './DialogContext';
|
|
4
5
|
export { default as useDialogSectionStyle } from './useDialogSectionStyle';
|
|
@@ -40,8 +40,7 @@ export default function DialogContent(props: DialogContentProps) {
|
|
|
40
40
|
]);
|
|
41
41
|
|
|
42
42
|
const contentFontStyle = createFontStyle(theme, {
|
|
43
|
-
|
|
44
|
-
// selector: (typography) => typography.body2.regular,
|
|
43
|
+
selector: (typography) => typography.body2.regular,
|
|
45
44
|
color: theme.palette.text.base,
|
|
46
45
|
});
|
|
47
46
|
|
package/src/Divider/Divider.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
import type { OverridableComponentProps } from '../types';
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
export type
|
|
5
|
+
export const dividerElementAligns = ['start', 'center', 'end'] as const;
|
|
6
|
+
export type DividerElementAlign = typeof dividerElementAligns[number];
|
|
7
7
|
|
|
8
8
|
export const dividerVariants = ['base', 'strong'] as const;
|
|
9
9
|
export type DividerVariant = typeof dividerVariants[number];
|
|
@@ -42,7 +42,7 @@ export default interface DividerProps extends OverridableComponentProps<ViewProp
|
|
|
42
42
|
* Set position of children.
|
|
43
43
|
* @default center
|
|
44
44
|
*/
|
|
45
|
-
elementAlign?:
|
|
45
|
+
elementAlign?: DividerElementAlign;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Select the style of the divider based on this value.
|
package/src/Divider/index.ts
CHANGED
package/src/Empty/Empty.tsx
CHANGED
|
@@ -55,8 +55,7 @@ export default function Empty(props: EmptyProps) {
|
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
const descriptionFontStyle = createFontStyle(theme, {
|
|
58
|
-
|
|
59
|
-
// selector: (typography) => typography.body2.regular,
|
|
58
|
+
selector: (typography) => typography.body3.regular,
|
|
60
59
|
color: theme.palette.text.base,
|
|
61
60
|
});
|
|
62
61
|
|
package/src/Flexbox/Flexbox.tsx
CHANGED
|
@@ -27,6 +27,7 @@ export default function createFlexbox(direction: 'row' | 'column') {
|
|
|
27
27
|
flexGrow,
|
|
28
28
|
flexShrink,
|
|
29
29
|
flexWrap,
|
|
30
|
+
gap,
|
|
30
31
|
children,
|
|
31
32
|
insets,
|
|
32
33
|
justifyContent,
|
|
@@ -46,6 +47,7 @@ export default function createFlexbox(direction: 'row' | 'column') {
|
|
|
46
47
|
flexGrow,
|
|
47
48
|
flexShrink,
|
|
48
49
|
flexWrap,
|
|
50
|
+
gap,
|
|
49
51
|
justifyContent,
|
|
50
52
|
overflow,
|
|
51
53
|
};
|
|
@@ -48,6 +48,11 @@ export default interface FlexboxProps extends OverridableComponentProps<ViewProp
|
|
|
48
48
|
*/
|
|
49
49
|
flexWrap?: FlexStyle['flexWrap'];
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Defines the spacing between items in a flex container.
|
|
53
|
+
*/
|
|
54
|
+
gap?: number | undefined;
|
|
55
|
+
|
|
51
56
|
/**
|
|
52
57
|
* Content of this component.
|
|
53
58
|
*/
|
package/src/IconButton/index.ts
CHANGED
|
@@ -1,36 +1,52 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { FlexStyle } from 'react-native';
|
|
3
|
+
import { Platform, Text, View } from 'react-native';
|
|
4
|
+
import type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
5
|
+
import { typographyOf } from '@fountain-ui/styles';
|
|
4
6
|
import ButtonBase from '../ButtonBase';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
+
import Row from '../Row';
|
|
8
|
+
import { createFontStyle, css, useTheme } from '../styles';
|
|
9
|
+
import type ListItemProps from './ListItemProps';
|
|
7
10
|
|
|
8
|
-
type ListItemStyles = NamedStylesStringUnion<'
|
|
11
|
+
type ListItemStyles = NamedStylesStringUnion<'content' | 'description' | 'divider' | 'dividerWrapper'>;
|
|
9
12
|
|
|
10
13
|
const useStyles: UseStyles<ListItemStyles> = function (): ListItemStyles {
|
|
11
14
|
const theme = useTheme();
|
|
12
15
|
|
|
13
16
|
return {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
paddingVertical: theme.spacing(3),
|
|
17
|
+
content: {
|
|
18
|
+
gap: theme.spacing(2),
|
|
19
|
+
paddingVertical: theme.spacing(3.75),
|
|
17
20
|
paddingHorizontal: theme.spacing(4),
|
|
18
21
|
width: '100%',
|
|
19
22
|
},
|
|
23
|
+
description: {
|
|
24
|
+
paddingRight: theme.spacing(20),
|
|
25
|
+
},
|
|
26
|
+
divider: {
|
|
27
|
+
borderBottomColor: theme.palette.border.weak,
|
|
28
|
+
borderBottomWidth: 0.5,
|
|
29
|
+
},
|
|
30
|
+
dividerWrapper: {
|
|
31
|
+
paddingHorizontal: theme.spacing(4),
|
|
32
|
+
},
|
|
20
33
|
};
|
|
21
34
|
};
|
|
22
35
|
|
|
23
36
|
export default function ListItem(props: ListItemProps) {
|
|
24
37
|
const {
|
|
25
|
-
alignItems = 'center',
|
|
38
|
+
alignItems = 'center' as FlexStyle['alignItems'],
|
|
26
39
|
button = false,
|
|
27
40
|
children,
|
|
41
|
+
description,
|
|
28
42
|
disabled = false,
|
|
29
43
|
onPress,
|
|
30
44
|
style,
|
|
31
45
|
...otherProps
|
|
32
46
|
} = props;
|
|
33
47
|
|
|
48
|
+
const theme = useTheme();
|
|
49
|
+
|
|
34
50
|
const styles = useStyles();
|
|
35
51
|
|
|
36
52
|
const rootComponentProps = {
|
|
@@ -38,33 +54,58 @@ export default function ListItem(props: ListItemProps) {
|
|
|
38
54
|
...otherProps,
|
|
39
55
|
};
|
|
40
56
|
|
|
41
|
-
const
|
|
42
|
-
styles.
|
|
43
|
-
{ alignItems },
|
|
57
|
+
const contentWrapperStyle = css([
|
|
58
|
+
styles.content,
|
|
44
59
|
style,
|
|
45
60
|
]);
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
const descriptionFontStyle = createFontStyle(theme, {
|
|
63
|
+
selector: (_) => typographyOf({
|
|
64
|
+
fontSize: 14,
|
|
65
|
+
lineHeight: 19.6,
|
|
66
|
+
fontFamily: 'PretendardStd-Regular',
|
|
67
|
+
letterSpacing: 0,
|
|
68
|
+
}),
|
|
69
|
+
color: theme.palette.text.base,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const content = (
|
|
73
|
+
<React.Fragment>
|
|
74
|
+
<Row alignItems={alignItems}>
|
|
75
|
+
{children}
|
|
76
|
+
</Row>
|
|
77
|
+
|
|
78
|
+
{description ? (
|
|
79
|
+
<Text style={css([
|
|
80
|
+
styles.description,
|
|
81
|
+
descriptionFontStyle,
|
|
82
|
+
])}>
|
|
83
|
+
{description}
|
|
84
|
+
</Text>
|
|
85
|
+
) : null}
|
|
86
|
+
</React.Fragment>
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
<View {...rootComponentProps}>
|
|
92
|
+
{button ? (
|
|
51
93
|
<ButtonBase
|
|
52
94
|
disabled={disabled}
|
|
53
95
|
onPress={onPress}
|
|
54
|
-
style={
|
|
96
|
+
style={contentWrapperStyle}
|
|
55
97
|
>
|
|
56
|
-
{
|
|
98
|
+
{content}
|
|
57
99
|
</ButtonBase>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
100
|
+
) : (
|
|
101
|
+
<View style={contentWrapperStyle}>
|
|
102
|
+
{content}
|
|
103
|
+
</View>
|
|
104
|
+
)}
|
|
61
105
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
style={rootStyle}
|
|
67
|
-
{...rootComponentProps}
|
|
68
|
-
/>
|
|
106
|
+
<View style={styles.dividerWrapper}>
|
|
107
|
+
<View style={styles.divider}/>
|
|
108
|
+
</View>
|
|
109
|
+
</View>
|
|
69
110
|
);
|
|
70
111
|
};
|
|
@@ -16,6 +16,11 @@ export default interface ListItemProps extends OverridableComponentProps<React.P
|
|
|
16
16
|
*/
|
|
17
17
|
button?: boolean;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Displays a description in this item.
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* Whether to prevent interaction with the ButtonBase.
|
|
21
26
|
* @default false
|
|
@@ -9,6 +9,8 @@ type ListItemSecondaryActionStyles = NamedStylesStringUnion<'root'>;
|
|
|
9
9
|
const useStyles: UseStyles<ListItemSecondaryActionStyles> = function (): ListItemSecondaryActionStyles {
|
|
10
10
|
return {
|
|
11
11
|
root: {
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
flexDirection: 'row',
|
|
12
14
|
flexShrink: 0,
|
|
13
15
|
marginLeft: 'auto',
|
|
14
16
|
},
|
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
import type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';
|
|
4
|
+
import { typographyOf } from '@fountain-ui/styles';
|
|
3
5
|
import Column from '../Column';
|
|
4
|
-
import
|
|
5
|
-
import { css, useTheme } from '../styles';
|
|
6
|
+
import { createFontStyle, css, useTheme } from '../styles';
|
|
6
7
|
import type ListItemTextProps from './ListItemTextProps';
|
|
7
8
|
|
|
8
|
-
type ListItemTextStyles = NamedStylesStringUnion<'root'
|
|
9
|
+
type ListItemTextStyles = NamedStylesStringUnion<'root'>;
|
|
9
10
|
|
|
10
11
|
const useStyles: UseStyles<ListItemTextStyles> = function (): ListItemTextStyles {
|
|
11
|
-
const theme = useTheme();
|
|
12
|
-
|
|
13
12
|
return {
|
|
14
13
|
root: {
|
|
15
14
|
flexGrow: 1,
|
|
16
15
|
flexShrink: 1,
|
|
17
16
|
},
|
|
18
|
-
multiline: {
|
|
19
|
-
marginBottom: theme.spacing(1),
|
|
20
|
-
},
|
|
21
17
|
};
|
|
22
18
|
};
|
|
23
19
|
|
|
24
20
|
export default function ListItemText(props: ListItemTextProps) {
|
|
25
21
|
const {
|
|
26
|
-
|
|
27
|
-
secondary,
|
|
22
|
+
children,
|
|
28
23
|
style,
|
|
29
24
|
...otherProps
|
|
30
25
|
} = props;
|
|
31
26
|
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
|
|
32
29
|
const styles = useStyles();
|
|
33
30
|
|
|
34
|
-
const
|
|
31
|
+
const fontStyle = createFontStyle(theme, {
|
|
32
|
+
selector: (_) => typographyOf({
|
|
33
|
+
fontSize: 16,
|
|
34
|
+
lineHeight: 19.2,
|
|
35
|
+
fontFamily: 'PretendardStd-Medium',
|
|
36
|
+
letterSpacing: 0,
|
|
37
|
+
}),
|
|
38
|
+
color: theme.palette.text.strong,
|
|
39
|
+
});
|
|
35
40
|
|
|
36
41
|
return (
|
|
37
42
|
<Column
|
|
@@ -41,22 +46,9 @@ export default function ListItemText(props: ListItemTextProps) {
|
|
|
41
46
|
])}
|
|
42
47
|
{...otherProps}
|
|
43
48
|
>
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
color={'strong'}
|
|
48
|
-
variant={'body3'}
|
|
49
|
-
style={isMultiline ? styles.multiline : undefined}
|
|
50
|
-
/>
|
|
51
|
-
) : null}
|
|
52
|
-
|
|
53
|
-
{secondary ? (
|
|
54
|
-
<Typography
|
|
55
|
-
children={secondary}
|
|
56
|
-
color={'strong'}
|
|
57
|
-
variant={'body3'}
|
|
58
|
-
/>
|
|
59
|
-
) : null}
|
|
49
|
+
<Text style={fontStyle}>
|
|
50
|
+
{children}
|
|
51
|
+
</Text>
|
|
60
52
|
</Column>
|
|
61
53
|
);
|
|
62
54
|
};
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type { TypographyProps } from '../Typography';
|
|
2
1
|
import type { OverridableComponentProps } from '../types';
|
|
3
2
|
import type { ColumnProps } from '../Column';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export default interface ListItemTextProps extends OverridableComponentProps<BaseProps, {
|
|
4
|
+
export default interface ListItemTextProps extends OverridableComponentProps<ColumnProps, {
|
|
8
5
|
/**
|
|
9
6
|
* The main content element.
|
|
10
7
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The secondary content element.
|
|
15
|
-
*/
|
|
16
|
-
secondary?: TypographyProps['children'];
|
|
8
|
+
children: string;
|
|
17
9
|
}> {}
|