Skip to content

Commit

Permalink
feat: refactor alert and radio modifier/responsive class name cat…
Browse files Browse the repository at this point in the history
…egorization
  • Loading branch information
saadeghi committed Aug 13, 2022
1 parent 77bf81a commit b58ecea
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 26 deletions.
12 changes: 12 additions & 0 deletions src/components/styled/alert.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.alert {
@apply bg-base-200 p-4 rounded-box;
&-info {
@apply bg-info text-info-content;
}
&-success {
@apply bg-success text-success-content;
}
&-warning {
@apply bg-warning text-warning-content;
}
&-error {
@apply bg-error text-error-content;
}
}
8 changes: 4 additions & 4 deletions src/docs/src/routes/components/alert.svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ published: true
<ClassTable
data="{[
{ type: 'component', class: 'alert', desc: 'Container element' },
{ type: 'responsive', class: 'alert-info', desc: 'Alert with `info` color' },
{ type: 'responsive', class: 'alert-success', desc: 'Alert with `success` color' },
{ type: 'responsive', class: 'alert-warning', desc: 'Alert with `warning` color' },
{ type: 'responsive', class: 'alert-error', desc: 'Alert with `error` color' },
{ type: 'modifier', class: 'alert-info', desc: 'Alert with `info` color' },
{ type: 'modifier', class: 'alert-success', desc: 'Alert with `success` color' },
{ type: 'modifier', class: 'alert-warning', desc: 'Alert with `warning` color' },
{ type: 'modifier', class: 'alert-error', desc: 'Alert with `error` color' },
]}"
/>

Expand Down
10 changes: 5 additions & 5 deletions src/docs/src/routes/components/radio.svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ published: true
<ClassTable
data="{[
{ type:'component', class: 'form-control', desc: 'Container element' },
{ type:'modifier', class: 'radio', desc: 'For radio input' },
{ type:'component', class: 'radio', desc: 'For radio input' },
{ type:'modifier', class: 'radio-primary', desc: 'Adds `primary` to radio' },
{ type:'modifier', class: 'radio-secondary', desc: 'Adds `secondary` to radio' },
{ type:'modifier', class: 'radio-accent', desc: 'Adds `accent` to radio' },
{ type:'modifier', class: 'radio-lg', desc: 'Large radio' },
{ type:'modifier', class: 'radio-md', desc: 'Medium radio (default)' },
{ type:'modifier', class: 'radio-sm', desc: 'Small radio' },
{ type:'modifier', class: 'radio-xs', desc: 'Extra small radio' },
{ type:'responsive', class: 'radio-lg', desc: 'Large radio' },
{ type:'responsive', class: 'radio-md', desc: 'Medium radio (default)' },
{ type:'responsive', class: 'radio-sm', desc: 'Small radio' },
{ type:'responsive', class: 'radio-xs', desc: 'Extra small radio' },
]}"
/>

Expand Down
17 changes: 0 additions & 17 deletions src/utilities/styled/alert.css

This file was deleted.

0 comments on commit b58ecea

Please sign in to comment.