Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 660ad42

Browse files
authored
style: make sylus example alerts change with kind (#1611)
1 parent 317987e commit 660ad42

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

examples/stylus/src/components/Alert.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import t from 'prop-types'
44
import './Alert.styl'
55

66
export const Alert = ({ children, kind, ...rest }) => (
7-
<div className="Alert" {...rest}>
7+
// space used after alert in order to have kind remain as a separate name
8+
<div className={'Alert ' + kind} {...rest}>
89
{children}
910
</div>
1011
)
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
.Alert {
2-
padding: 1rem;
3-
margin: 1rem;
4-
border-radius: 0.25rem;
2+
padding: .5rem
3+
margin: 1rem
4+
border-radius: 0.25rem
5+
background-color: white
6+
&.info {
7+
color: white
8+
background-color: #5352ED
9+
}
10+
&.positive {
11+
background-color: #2ED573
12+
}
13+
&.negative {
14+
background-color: #FF4757
15+
}
16+
&.warning {
17+
background-color: #FFA502
18+
}
519
}

0 commit comments

Comments
 (0)