Skip to content

Commit

Permalink
chore: merge latest kit
Browse files Browse the repository at this point in the history
  • Loading branch information
huhuanming committed Oct 19, 2023
1 parent 6be51d4 commit 5b43668
Show file tree
Hide file tree
Showing 12 changed files with 310 additions and 339 deletions.
1 change: 0 additions & 1 deletion undefined

This file was deleted.

20 changes: 16 additions & 4 deletions packages/kit/src/routes/Gallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { createStackNavigator } from '@onekeyhq/components';
import ComponentsScreen from '@onekeyhq/kit/src/views/Components';
import ActionListGallery from '@onekeyhq/kit/src/views/Components/stories/ActionList';
import BadgeGallery from '@onekeyhq/kit/src/views/Components/stories/Badge';
import ButtonsGallery from '@onekeyhq/kit/src/views/Components/stories/Buttons';
import ButtonGallery from '@onekeyhq/kit/src/views/Components/stories/Button';
import CheckboxGallery from '@onekeyhq/kit/src/views/Components/stories/Checkbox';
import CollapsibleTabViewGallery from '@onekeyhq/kit/src/views/Components/stories/CollapsibleTabView';
import DialogGallery from '@onekeyhq/kit/src/views/Components/stories/Dialog';
import EmptyGallery from '@onekeyhq/kit/src/views/Components/stories/Empty';
import IconGallery from '@onekeyhq/kit/src/views/Components/stories/Icon';
import IconButtonGallery from '@onekeyhq/kit/src/views/Components/stories/IconButton';
import InputGallery from '@onekeyhq/kit/src/views/Components/stories/Input';
Expand All @@ -18,6 +19,8 @@ import SelectGallery from '@onekeyhq/kit/src/views/Components/stories/Select';
import SliderGallery from '@onekeyhq/kit/src/views/Components/stories/Slider';
import SwitchGallery from '@onekeyhq/kit/src/views/Components/stories/Switch';
import ToastGallery from '@onekeyhq/kit/src/views/Components/stories/Toast';
import ToggleGroupGallery from '@onekeyhq/kit/src/views/Components/stories/ToggleGroup';
import TooltipGallery from '@onekeyhq/kit/src/views/Components/stories/Tooltip';
import TypographyGallery from '@onekeyhq/kit/src/views/Components/stories/Typography';

import AlertGallery from '../../views/Components/stories/Alert';
Expand All @@ -31,14 +34,16 @@ export enum GalleryRoutes {
Components = 'components',
ComponentTypography = 'component/typography',
ComponentLottieView = 'component/lottieview',
ComponentTooltip = 'component/tooltip',
ComponentIcon = 'component/icon',
ComponentButton = 'component/button',
ComponentSelect = 'component/select',
ComponentIconButton = 'component/iconbutton',
ComponentIconButton = 'component/iconButton',
ComponentBadge = 'component/badge',
ComponentDialog = 'component/dialog',
ComponentForm = 'component/form',
ComponentNavigation = 'component/navigation',
ComponentEmpty = 'component/empty',
ComponentSwitch = 'component/switch',
ComponentInput = 'component/input',
ComponentAlert = 'component/alert',
Expand All @@ -51,6 +56,7 @@ export enum GalleryRoutes {
ComponentSlider = 'component/slider',
ComponentTextArea = 'component/textArea',
ComponentPopover = 'component/popover',
ComponentToggleGroup = 'component/toggleGroup',
ComponentTheme = 'component/theme',
ComponentCollapsibleTabs = 'component/collapsibleTabs',
componentQRCode = 'component/qrCode',
Expand All @@ -68,18 +74,24 @@ export const stackScreenList = [
},
{ name: GalleryRoutes.ComponentIcon, component: IconGallery },
{ name: GalleryRoutes.ComponentToast, component: ToastGallery },
{ name: GalleryRoutes.ComponentIconButton, component: IconButtonGallery },
{ name: GalleryRoutes.ComponentButton, component: ButtonsGallery },
{ name: GalleryRoutes.ComponentSelect, component: SelectGallery },
{ name: GalleryRoutes.ComponentTooltip, component: TooltipGallery },
{ name: GalleryRoutes.ComponentBadge, component: BadgeGallery },
{ name: GalleryRoutes.ComponentInput, component: InputGallery },
{ name: GalleryRoutes.ComponentDialog, component: DialogGallery },
{ name: GalleryRoutes.ComponentEmpty, component: EmptyGallery },
{ name: GalleryRoutes.ComponentRadio, component: RadioGallery },
{ name: GalleryRoutes.ComponentCheckbox, component: CheckboxGallery },
{ name: GalleryRoutes.ComponentToggleGroup, component: ToggleGroupGallery },
{ name: GalleryRoutes.ComponentActionList, component: ActionListGallery },
{ name: GalleryRoutes.ComponentPopover, component: PopoverGallery },
{ name: GalleryRoutes.ComponentProgress, component: ProgressGallery },
{
name: GalleryRoutes.ComponentIconButton,
component: IconButtonGallery,
},
{ name: GalleryRoutes.ComponentSwitch, component: SwitchGallery },
{ name: GalleryRoutes.ComponentButton, component: ButtonGallery },
{ name: GalleryRoutes.ComponentTextArea, component: TextAreaGallery },
{ name: GalleryRoutes.ComponentSlider, component: SliderGallery },
{
Expand Down
87 changes: 87 additions & 0 deletions packages/kit/src/views/Components/stories/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { Button, Stack, XStack } from '@onekeyhq/components';

import { Layout } from './utils/Layout';

const ButtonGallery = () => (
<Layout
description=".."
suggestions={['...']}
boundaryConditions={['...']}
elements={[
{
title: 'Variants',
element: (
<XStack space="$2" alignItems="center">
<Button icon="PlaceholderOutline">Secondary</Button>
<Button icon="PlaceholderOutline" variant="primary">
Primary
</Button>
<Button icon="PlaceholderOutline" variant="destructive">
Destructive
</Button>
<Button icon="PlaceholderOutline" variant="tertiary">
Tertiary
</Button>
</XStack>
),
},
{
title: 'Sizes',
element: (
<Stack space="$4">
<XStack space="$4" alignItems="flex-end">
<Button size="small">Small</Button>
<Button>Medium</Button>
<Button size="large">Large</Button>
</XStack>
<XStack space="$4" alignItems="flex-end">
<Button size="small" icon="PlaceholderOutline">
Small
</Button>
<Button icon="PlaceholderOutline">Medium</Button>
<Button size="large" icon="PlaceholderOutline">
Large
</Button>
</XStack>
</Stack>
),
},
{
title: 'Disabled',
element: (
<Stack space="$4">
<Button disabled>Secondary</Button>
<Button disabled variant="primary">
Primary
</Button>
<Button disabled variant="destructive">
Destructive
</Button>
<Button disabled variant="tertiary">
Tertiary
</Button>
</Stack>
),
},
{
title: 'Loading',
element: (
<Stack space="$4">
<Button loading>Secondary</Button>
<Button loading variant="primary">
Primary
</Button>
<Button loading variant="destructive">
Destructive
</Button>
<Button loading variant="tertiary">
Tertiary
</Button>
</Stack>
),
},
]}
/>
);

export default ButtonGallery;
214 changes: 0 additions & 214 deletions packages/kit/src/views/Components/stories/Buttons.tsx

This file was deleted.

Loading

0 comments on commit 5b43668

Please sign in to comment.