Skip to content

Commit

Permalink
style: ant theme (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
jared-dickman authored Jan 24, 2024
1 parent 9e5541b commit 34dfe0d
Show file tree
Hide file tree
Showing 70 changed files with 607 additions and 179 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/tokens-to-css.yml

This file was deleted.

12 changes: 0 additions & 12 deletions design/tokens.json

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"test-storybook": "test-storybook",
"test-storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"npm run build-storybook --quiet && NODE_NO_WARNINGS=1 npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:127.0.0.1:6006 && npm run test-storybook\"",
"build-dist": "sh ./scripts/build-dist.sh",
"build-storybook": "storybook build",
"tokens-to-css": "npx style-dictionary build --config ./style-dictionary.json"
"build-storybook": "storybook build"
}
}
2 changes: 1 addition & 1 deletion scripts/build-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ echo '---------- Begin dist assets ----------'
DIR=$(cd "$(dirname "$0")"; pwd)

vite build
npm run tokens-to-css

cp $DIR/../src/styles/*.css $DIR/../dist
5 changes: 3 additions & 2 deletions src/components/data-display/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Avatar as AntAvatar } from "antd";
import { AvatarProps as AntAvatarProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IAvatarProps extends AntAvatarProps {
}

export const Avatar = (props: IAvatarProps) => {
return <>
return <ConfigProvider>
<AntAvatar {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Badge/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Badge as AntBadge } from "antd";
import { BadgeProps as AntBadgeProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IBadgeProps extends AntBadgeProps {
}

export const Badge = (props: IBadgeProps) => {
return <>
return <ConfigProvider>
<AntBadge {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Calendar as AntCalendar } from "antd";
import { CalendarProps as AntCalendarProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ICalendarProps extends AntCalendarProps {
}

export const Calendar = (props: ICalendarProps) => {
return <>
return <ConfigProvider>
<AntCalendar {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Card as AntCard } from "antd";
import { CardProps as AntCardProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ICardProps extends AntCardProps {
}

export const Card = (props: ICardProps) => {
return <>
return <ConfigProvider>
<AntCard {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Carousel/Carousel.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Carousel as AntCarousel } from "antd";
import { CarouselProps as AntCarouselProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ICarouselProps extends AntCarouselProps {
}

export const Carousel = (props: ICarouselProps) => {
return <>
return <ConfigProvider>
<AntCarousel {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Collapse/Collapse.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Collapse as AntCollapse } from "antd";
import { CollapseProps as AntCollapseProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ICollapseProps extends AntCollapseProps {
}

export const Collapse = (props: ICollapseProps) => {
return <>
return <ConfigProvider>
<AntCollapse {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Descriptions/Descriptions.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Descriptions as AntDescriptions } from "antd";
import { DescriptionsProps as AntDescriptionsProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IDescriptionsProps extends AntDescriptionsProps {
}

export const Descriptions = (props: IDescriptionsProps) => {
return <>
return <ConfigProvider>
<AntDescriptions {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Empty/Empty.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Empty as AntEmpty } from "antd";
import { EmptyProps as AntEmptyProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IEmptyProps extends AntEmptyProps {
}

export const Empty = (props: IEmptyProps) => {
return <>
return <ConfigProvider>
<AntEmpty {...props}/>
</>;
</ConfigProvider>;
};

Empty.PRESENTED_IMAGE_DEFAULT = AntEmpty.PRESENTED_IMAGE_DEFAULT;
Expand Down
5 changes: 3 additions & 2 deletions src/components/data-display/Image/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Image as AntImage } from "antd";
import { ImageProps as AntImageProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IImageProps extends AntImageProps {
}

export const Image = (props: IImageProps) => {
return <>
return <ConfigProvider>
<AntImage {...props}/>
</>;
</ConfigProvider>;
};
11 changes: 7 additions & 4 deletions src/components/data-display/List/List.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { List as AntList } from "antd";
import { ListProps as AntListProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IListProps<T> extends AntListProps<T> {
export interface IListProps extends AntListProps {
}

export const List = <T extends any>(props: IListProps<T>) => <>
<AntList {...props}/>
</>;
export const List = (props: IListProps) => {
return <ConfigProvider>
<AntList {...props}/>
</ConfigProvider>;
};

List.Item = AntList.Item
5 changes: 3 additions & 2 deletions src/components/data-display/Popover/Popover.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Popover as AntPopover } from "antd";
import { PopoverProps as AntPopoverProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IPopoverProps extends AntPopoverProps {
}

export const Popover = (props: IPopoverProps) => {
return <>
return <ConfigProvider>
<AntPopover {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/QRCode/QRCode.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { QRCode as AntQRCode } from "antd";
import { QRCodeProps as AntQRCodeProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IQRCodeProps extends AntQRCodeProps {
}

export const QRCode = (props: IQRCodeProps) => {
return <>
return <ConfigProvider>
<AntQRCode {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Segmented/Segmented.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Segmented as AntSegmented } from "antd";
import { SegmentedProps as AntSegmentedProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ISegmentedProps extends AntSegmentedProps {
ref?: React.RefObject<HTMLDivElement>;
}

export const Segmented = (props: ISegmentedProps) => {
return <>
return <ConfigProvider>
<AntSegmented {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Statistic/Statistic.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Statistic as AntStatistic } from "antd";
import { StatisticProps as AntStatisticProps } from "antd";
import { ConfigProvider } from "src/components";

export interface IStatisticProps extends AntStatisticProps {
}

export const Statistic = (props: IStatisticProps) => {
return <>
return <ConfigProvider>
<AntStatistic {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Table as AntTable } from "antd";
import { TableProps as AntTableProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ITableProps extends AntTableProps {
}

export const Table = (props: ITableProps) => {
return <>
return <ConfigProvider>
<AntTable {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Tabs as AntTabs } from "antd";
import { TabsProps as AntTabsProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ITabsProps extends AntTabsProps {
}

export const Tabs = (props: ITabsProps) => {
return <>
return <ConfigProvider>
<AntTabs {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Tag/Tag.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Tag as AntTag } from "antd";
import { TagProps as AntTagProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ITagProps extends AntTagProps {
}

export const Tag = (props: ITagProps) => {
return <>
return <ConfigProvider>
<AntTag {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Timeline/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Timeline as AntTimeline } from "antd";
import { TimelineProps as AntTimelineProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ITimelineProps extends AntTimelineProps {
}

export const Timeline = (props: ITimelineProps) => {
return <>
return <ConfigProvider>
<AntTimeline {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Tooltip as AntTooltip } from "antd";
import { TooltipPropsWithTitle as AntTooltipPropsWithTitle } from "antd/es/tooltip";
import { ConfigProvider } from "src/components";

export interface ITooltipProps extends AntTooltipPropsWithTitle {
}

export const Tooltip = (props: ITooltipProps) => {
return <>
return <ConfigProvider>
<AntTooltip {...props}/>
</>;
</ConfigProvider>;
};
5 changes: 3 additions & 2 deletions src/components/data-display/Tour/Tour.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Tour as AntTour } from "antd";
import { TourProps as AntTourProps } from "antd";
import { ConfigProvider } from "src/components";

export interface ITourProps extends AntTourProps {
}

export const Tour = (props: ITourProps) => {
return <>
return <ConfigProvider>
<AntTour {...props}/>
</>;
</ConfigProvider>;
};
Loading

0 comments on commit 34dfe0d

Please sign in to comment.