Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/atoms/label/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { colors } from '../../ions/variables';
import { Icon } from '../..';

export interface LabelProps {
currency?: 'tkai' | 'vkai' | undefined;
currency?: 'lx' | 'vote' | 'tkai' | 'vkai' | undefined;
value: string;
className?: string;
style?: React.CSSProperties;
Expand All @@ -16,8 +16,7 @@ const Label = (props: LabelProps) => {
return (
<Styles.LabelStyle className={className} style={style}>
{value}
{currency === 'tkai' && <Icon icon="tkai" fill={colors.grey200} />}
{currency === 'vkai' && <Icon icon="vkai" fill={colors.grey200} />}
{currency && <Icon icon={currency} fill={colors.grey200} />}
</Styles.LabelStyle>
);
};
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/label/stories/label.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
currency: {
control: {
type: 'select',
options: ['', 'tkai', 'vkai'],
options: ['', 'lx', 'vote', 'tkai', 'vkai'],
},
},
},
Expand All @@ -20,7 +20,7 @@ export const LabelComponentKAI = (args: LabelProps) => {

LabelComponentKAI.storyName = 'With Currency';
LabelComponentKAI.args = {
currency: 'tkai',
currency: 'lx',
value: 'Amount',
};

Expand Down
2 changes: 2 additions & 0 deletions src/ions/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ const icons: IconsType = {
'M2.216 5.6A3.384 3.384 0 015.6 2.216h20.8A3.384 3.384 0 0129.785 5.6v11.2a3.384 3.384 0 01-3.385 3.385h-3.2a.984.984 0 110-1.97h3.2c.782 0 1.416-.633 1.416-1.415V5.6c0-.782-.634-1.415-1.416-1.415H5.6c-.782 0-1.415.633-1.415 1.415v11.2c0 .782.633 1.416 1.415 1.416h3.2a.984.984 0 110 1.969H5.6A3.384 3.384 0 012.216 16.8V5.6zM8 7.016c.544 0 .985.44.985.984v5.6a.984.984 0 11-1.97 0V8c0-.543.442-.984.985-.984zm8 1.969a2.216 2.216 0 100 4.43 2.216 2.216 0 000-4.43zM11.816 11.2a4.184 4.184 0 118.369 0 4.184 4.184 0 01-8.37 0zM24 7.016c.544 0 .985.44.985.984v5.6a.984.984 0 01-1.97 0V8c0-.543.441-.984.985-.984zm-8 11.543c.543 0 .983.44.983.985v6.88l2.54-2.54a.984.984 0 111.393 1.391l-4.221 4.221a.984.984 0 01-1.392 0l-4.526-4.525a.984.984 0 011.393-1.393l2.845 2.846v-6.88c0-.544.44-.985.984-.985z',
withdraw:
'M29.8 26.4a3.4 3.4 0 01-3.4 3.4H5.6a3.4 3.4 0 01-3.4-3.4V15.2a3.4 3.4 0 013.4-3.4h3.2a1 1 0 110 2H5.6a1.4 1.4 0 00-1.4 1.4v11.2a1.4 1.4 0 001.4 1.4h20.8a1.4 1.4 0 001.4-1.4V15.2a1.4 1.4 0 00-1.4-1.4h-3.2a1 1 0 110-2h3.2a3.4 3.4 0 013.4 3.4v11.2zM24 25a1 1 0 01-1-1v-5.6a1 1 0 112 0V24a1 1 0 01-1 1zm-8-2a2.2 2.2 0 100-4.4 2.2 2.2 0 000 4.4zm4.2-2.2a4.2 4.2 0 11-8.4 0 4.2 4.2 0 018.4 0zM8 25a1 1 0 01-1-1v-5.6a1 1 0 112 0V24a1 1 0 01-1 1zm8-11.543a1 1 0 01-1-1l.001-6.843-2.513 2.514a1 1 0 11-1.415-1.414l4.221-4.221a1 1 0 011.414 0l4.526 4.525a1 1 0 01-1.415 1.415l-2.818-2.819v6.843a1 1 0 01-1 1z',
lx: 'M27 9.4V5h-7.15v4.4h-7.7V5H5v4.4h3.3v4.4h3.85v4.4h-3.3v4.4H5V27h7.15v-4.4h7.7V27H27v-4.4h-3.85v-4.4h-3.3v-4.4h3.85V9.4z',
vote: 'M5.21704 23L0 8H3.3417L5.74573 15.2987C5.97183 16.0168 6.20459 16.7819 6.444 17.594C6.6834 18.3993 6.93611 19.2617 7.20211 20.1812C7.46147 19.2617 7.7042 18.3993 7.9303 17.594C8.16306 16.7819 8.38917 16.0168 8.60862 15.2987L10.9328 8H14.2346L9.12733 23H5.21704Z M32 11V8H27.1695V11H21.9674V8H17.1369V11H19.3664V14H21.9674V17H19.7379V20H17.1369V23H21.9674V20H27.1695V23H32V20H29.399V17H27.1695V14H29.7705V11H32Z'
};

export default icons;
2 changes: 1 addition & 1 deletion src/molecules/card-value/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as Styles from './styles';

export interface CardValueProps {
label: string;
currency?: 'tkai' | 'vkai' | undefined;
currency?: 'lx' | 'vote' | 'tkai' | 'vkai' | undefined;
value: string | number;
description?: string;
buttonValue?: string;
Expand Down
6 changes: 3 additions & 3 deletions src/molecules/card-value/stories/card-value.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
currency: {
control: {
type: 'select',
options: ['', 'tkai', 'vkai'],
options: ['', 'lx', 'vote', 'tkai', 'vkai'],
},
},
},
Expand All @@ -18,10 +18,10 @@ export const CardValueComponentKAI = (args: CardValueProps) => (
<CardValue {...args} />
);

CardValueComponentKAI.storyName = 'With TKAI';
CardValueComponentKAI.storyName = 'With LX';
CardValueComponentKAI.args = {
label: 'Amount',
currency: 'tkai',
currency: 'lx',
value: '13000',
showArrowButton: false,
};
Expand Down
2 changes: 1 addition & 1 deletion src/molecules/form-group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Label } from '../..';
import * as Styles from './styles';

export interface FormGroupProps {
currency?: 'tkai' | 'vkai' | undefined;
currency?: 'lx' | 'vote' | 'tkai' | 'vkai' | undefined;
label: string;
error?: boolean;
children: React.ReactNode;
Expand Down
4 changes: 2 additions & 2 deletions src/molecules/form-group/stories/form-group.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
currency: {
control: {
type: 'select',
options: ['', 'tkai', 'vkai'],
options: ['', 'lx', 'vote', 'tkai', 'vkai'],
},
},
},
Expand All @@ -32,6 +32,6 @@ export const FormGroupComponent = (args: FormGroupProps) => {
FormGroupComponent.storyName = 'Form Group';
FormGroupComponent.args = {
label: 'Awesome Label',
currency: '',
currency: 'lx',
error: false,
};
4 changes: 4 additions & 0 deletions src/molecules/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ const Table = <CellData extends CellBaseType>(props: TableProps<CellData>) => {
<Icon icon="tkai" fill="hsl(0, 0%, 16%)" />
) : className === 'vkai' ? (
<Icon icon="vkai" fill="hsl(0, 0%, 16%)" />
) : className === 'lx' ? (
<Icon icon="lx" fill="hsl(0, 0%, 16%)" />
) : className === 'vote' ? (
<Icon icon="vote" fill="hsl(0, 0%, 16%)" />
) : null}
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion src/molecules/table/stories/table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const columns = {
id: 'amount',
value: 'Amount',
dataKey: 'amount',
className: 'vkai',
className: 'lx',
dataTestId: 'header-amount-id',
},
{
Expand Down
8 changes: 6 additions & 2 deletions src/molecules/table/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ export const Table = styled.table<TableProps>`
}

&.vkai,
&.tkai {
&.tkai,
&.lx,
&.vote {
text-align: right;

> div {
Expand Down Expand Up @@ -253,7 +255,9 @@ export const Table = styled.table<TableProps>`
}

&.tkai,
&.vkai {
&.vkai,
&.lx,
&.vote {
svg {
float: right;
margin-left: ${rem('5px')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const menu = [
url: '#0',
},
{
icon: 'tkai',
icon: 'lx',
label: 'Transactions',
url: '#0',
},
Expand Down