Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
fix(Chip)!: rename prop 'label' to 'tile'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukicenturi authored and kelsos committed Dec 14, 2023
1 parent cda5438 commit 8fb4d94
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions example/src/views/ChipView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,90 +119,90 @@ const chips = ref<ChipProps[]>([
color: 'primary',
variant: 'filled',
closeable: false,
label: true,
tile: true,
},
{
disabled: false,
color: 'secondary',
variant: 'filled',
closeable: false,
label: true,
tile: true,
},
{
disabled: false,
color: 'error',
variant: 'filled',
closeable: false,
label: true,
tile: true,
},
{
disabled: false,
color: 'warning',
variant: 'filled',
closeable: false,
label: true,
tile: true,
},
{
disabled: false,
color: 'info',
variant: 'filled',
closeable: false,
label: true,
tile: true,
},
{
disabled: false,
color: 'success',
variant: 'filled',
closeable: false,
label: true,
tile: true,
},
{
disabled: false,
color: 'primary',
variant: 'filled',
closeable: false,
label: true,
tile: true,
clickable: true,
},
{
disabled: false,
color: 'secondary',
variant: 'filled',
closeable: false,
label: true,
tile: true,
clickable: true,
},
{
disabled: false,
color: 'error',
variant: 'filled',
closeable: false,
label: true,
tile: true,
clickable: true,
},
{
disabled: false,
color: 'warning',
variant: 'filled',
closeable: false,
label: true,
tile: true,
clickable: true,
},
{
disabled: false,
color: 'info',
variant: 'filled',
closeable: false,
label: true,
tile: true,
clickable: true,
},
{
disabled: false,
color: 'success',
variant: 'filled',
closeable: false,
label: true,
tile: true,
clickable: true,
},
{
Expand Down
6 changes: 3 additions & 3 deletions src/components/chips/Chip.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const meta: Meta<Props> = {
tags: ['autodocs'],
render,
argTypes: {
label: { control: 'boolean' },
tile: { control: 'boolean' },
children: { control: 'string' },
prepend: { control: 'text' },
clickable: { control: 'boolean' },
Expand Down Expand Up @@ -72,10 +72,10 @@ export const Default: Story = {
},
};

export const Label: Story = {
export const Tile: Story = {
args: {
children: 'Chip',
label: true,
tile: true,
variant: 'filled',
closeable: false,
disabled: false,
Expand Down
8 changes: 4 additions & 4 deletions src/components/chips/Chip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Icon from '@/components/icons/Icon.vue';
import { type RuiIcons } from '~/src';
export interface Props {
label?: boolean;
tile?: boolean;
clickable?: boolean;
closeable?: boolean;
disabled?: boolean;
Expand All @@ -23,7 +23,7 @@ defineOptions({
});
const props = withDefaults(defineProps<Props>(), {
label: false,
tile: false,
size: 'md',
color: 'grey',
clickable: false,
Expand Down Expand Up @@ -76,7 +76,7 @@ const style: ComputedRef<Partial<CSSStyleDeclaration>> = computed(() => {
css[variant ?? ''],
{
[css.disabled]: disabled,
[css.label]: label,
[css.tile]: tile,
[css.readonly]: !clickable,
},
]"
Expand Down Expand Up @@ -119,7 +119,7 @@ const style: ComputedRef<Partial<CSSStyleDeclaration>> = computed(() => {
@apply inline-flex items-center justify-between rounded-full px-1.5 py-[0.25rem] transition-all cursor-default;
@apply max-w-full truncate;
&.label {
&.tile {
@apply rounded-sm;
}
Expand Down

0 comments on commit 8fb4d94

Please sign in to comment.