File tree Expand file tree Collapse file tree 7 files changed +14
-20
lines changed Expand file tree Collapse file tree 7 files changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,12 @@ interface Props extends GroupProps {}
7
7
8
8
const {
9
9
withSeparator,
10
- outline,
11
10
className
12
11
} = Astro .props
13
12
14
13
const classes = [
15
14
styles .group ,
16
15
withSeparator && styles .separator ,
17
- outline && styles .outline ,
18
16
className
19
17
]
20
18
---
Original file line number Diff line number Diff line change 6
6
import styles from ' ./group.module.scss'
7
7
8
8
export let withSeparator: GroupProps [' withSeparator' ] = false
9
- export let outline: GroupProps [' outline' ] = false
10
9
export let className: GroupProps [' className' ] = ' '
11
10
12
11
const classes = classNames ([
13
12
styles .group ,
14
13
withSeparator && styles .separator ,
15
- outline && styles .outline ,
16
14
className
17
15
])
18
16
</script >
Original file line number Diff line number Diff line change @@ -7,14 +7,12 @@ import styles from './group.module.scss'
7
7
8
8
const Group = ( {
9
9
withSeparator,
10
- outline,
11
10
className,
12
11
children
13
12
} : ReactGroupProps ) => {
14
13
const classes = classNames ( [
15
14
styles . group ,
16
15
withSeparator && styles . separator ,
17
- outline && styles . outline ,
18
16
className
19
17
] )
20
18
Original file line number Diff line number Diff line change 2
2
3
3
.group {
4
4
@include layout (flex , none );
5
+ @include visibility (auto );
5
6
6
7
button ,
7
8
span {
16
17
}
17
18
}
18
19
19
- & .separator button ,
20
- & .separator span {
21
- @include border (1px , primary- 70);
22
-
23
- & :first-child {
24
- @include border (right , 0 );
25
- }
26
-
27
- & :last-child {
28
- @include border (left , 0 );
29
- }
20
+ & .separator button :not (:last-child ),
21
+ & .separator span :not (:last-child ) {
22
+ @include border (1px , right , primary- 70);
30
23
}
31
24
32
25
& .outline button
Original file line number Diff line number Diff line change 1
1
export type GroupProps = {
2
2
withSeparator ?: boolean
3
- outline ?: boolean
4
3
className ?: string
5
4
}
6
5
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const sections = getSections({
67
67
</ComponentWrapper >
68
68
69
69
<ComponentWrapper title = " Outline buttons" >
70
- <section.component outline = { true } >
70
+ <section.component >
71
71
<Button theme = " outline" >Profile</Button >
72
72
<Button theme = " outline" >Preferences</Button >
73
73
<Button theme = " outline" >Settings</Button >
@@ -163,7 +163,7 @@ const sections = getSections({
163
163
</ComponentWrapper >
164
164
165
165
<ComponentWrapper title = " Outline badges" >
166
- <section.component outline = { true } >
166
+ <section.component >
167
167
<Badge theme = " outline" hover = { true } >Profile</Badge >
168
168
<Badge theme = " outline" hover = { true } >Preferences</Badge >
169
169
<Badge theme = " outline" hover = { true } >Settings</Badge >
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import Badge from '@components/Badge/Badge.astro'
10
10
import Button from ' @components/Button/Button.astro'
11
11
import Checkbox from ' @components/Checkbox/Checkbox.astro'
12
12
import Collapsible from ' @components/Collapsible/Collapsible.astro'
13
+ import Group from ' @components/Group/Group.astro'
13
14
import Icon from ' @components/Icon/Icon.astro'
14
15
import Input from ' @components/Input/Input.astro'
15
16
import List from ' @components/List/List.astro'
@@ -113,6 +114,13 @@ const tabItems = [{
113
114
<Badge slot =" on" >Expand</Badge >
114
115
</Collapsible >
115
116
</CardWrapper >
117
+ <CardWrapper title =" Group" href =" /group" >
118
+ <Group withSeparator ={ true } >
119
+ <Button theme =" secondary" >Profile</Button >
120
+ <Button theme =" secondary" >Repos</Button >
121
+ <Button theme =" secondary" >Stars</Button >
122
+ </Group >
123
+ </CardWrapper >
116
124
<CardWrapper title =" Icon" href =" /icon" >
117
125
<Icon
118
126
type =" github"
You can’t perform that action at this time.
0 commit comments