Skip to content

Commit

Permalink
fix: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-kleszcz committed Jul 24, 2023
1 parent 3eff60a commit b8ea12a
Show file tree
Hide file tree
Showing 3 changed files with 1,038 additions and 1,466 deletions.
6 changes: 3 additions & 3 deletions src/components/Label/Label.props.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { SystemProps } from '@xstyled/styled-components';

import { config } from './Label.styles';
import { ButtonProps } from '../Button';
// import { ButtonProps } from '../Button';

import { Theme } from '@/theme';
import { DeepPartial } from '@/utility-types/DeepPartial';

export type LabelProps = {
label: string;
action?: ButtonProps<'bare'>;
// action?: ButtonProps<'bare'>;
tooltip?: boolean;
optional?: boolean;
optional?: string;
custom?: DeepPartial<SystemProps<Theme> & typeof config>;
};
11 changes: 6 additions & 5 deletions src/components/Label/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { merge } from 'lodash';

import { LabelProps } from './Label.props';
import { config as defaultConfig } from './Label.styles';
import { Button } from '../Button';
// import { Button } from '../Button';

import { tet } from '@/tetrisly';

Expand All @@ -24,9 +24,9 @@ export const Label = ({
return (
<tet.div {...labelStyles} {...rest} data-testid="label">
{label}
{optional && (
{!!optional && (
<tet.span {...optionalStyles} data-testid="label-optional">
(optional)
({optional})
</tet.span>
)}
{/* TODO: add tooltip instead of bare icon, when we get one */}
Expand All @@ -35,14 +35,15 @@ export const Label = ({
<Icon name="20-info-fill" />
</tet.span>
)}
{!!action && (
{/* TODO: add action when we discuss how they should behave */}
{/* {!!action && (
<Button
variant="bare"
{...action}
marginLeft="auto"
data-testid="label-action"
/>
)}
)} */}
</tet.div>
);
};
Loading

0 comments on commit b8ea12a

Please sign in to comment.