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

Commit 6a96c64

Browse files
committed
feat(box): added some more props
1 parent 5b2233a commit 6a96c64

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

src/App.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<Box bg="red.200" border-left="4px" my="5" rounded="md" shadow="md" p="3" color="red.800">
2929
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Debitis incidunt
3030
</Box>
31+
<Anchor bg="indigo.200" p="3" bb="4px" rounded="sm">
32+
Basic Link
33+
</Anchor>
3134
</theme-provider>
3235
</template>
3336

@@ -38,6 +41,8 @@ import Box from './components/Box'
3841
import theme from './lib/theme'
3942
import { useIncrement } from './use-increment'
4043
44+
const Anchor = Box.withComponent('a')
45+
4146
export default {
4247
setup () {
4348
const { state, increment } = useIncrement()
@@ -52,7 +57,8 @@ export default {
5257
components: {
5358
Button,
5459
ThemeProvider,
55-
Box
60+
Box,
61+
Anchor
5662
}
5763
}
5864
</script>

src/components/Box/config.js

+20
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,26 @@ export const config = {
9393
property: 'boxShadow',
9494
scale: 'shadows'
9595
},
96+
b: {
97+
property: 'border',
98+
scale: 'borders'
99+
},
100+
bl: {
101+
property: 'border-left',
102+
scale: 'borders'
103+
},
104+
bt: {
105+
property: 'border-top',
106+
scale: 'borders'
107+
},
108+
br: {
109+
property: 'border-right',
110+
scale: 'borders'
111+
},
112+
bb: {
113+
property: 'border-bottom',
114+
scale: 'borders'
115+
},
96116
textDecoration: { property: 'textDecoration' },
97117
overflowX: true,
98118
overflowY: true,

src/components/Box/props.js

+8
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,16 @@ const allProps = {
6868
roundedTopLeft: [String, Array],
6969
roundedBottomRight: [String, Array],
7070
roundedBottomLeft: [String, Array],
71+
b: [String, Array],
72+
br: [String, Array],
73+
bb: [String, Array],
74+
bl: [String, Array],
75+
bt: [String, Array],
7176
border: [String, Array],
7277
borderLeft: [String, Array],
78+
borderRight: [String, Array],
79+
borderTop: [String, Array],
80+
borderBottom: [String, Array],
7381
shadow: [Number, String, Array],
7482
backgroundColor: String,
7583
pos: [String, Array],

0 commit comments

Comments
 (0)