Skip to content

Commit

Permalink
fix(space): default align
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed Apr 1, 2024
1 parent 2895db6 commit c38632d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/components/space.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ import { RSpace, RText } from 'roughness'

<template #default-value>

`stretch` if `vertical`, `'start'` else
`stretch`

</template>

Expand Down
6 changes: 1 addition & 5 deletions src/space/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defineOptions({
})
const {
align: userAlign,
align = 'stretch',
justify = 'start',
inline = false,
reverse = false,
Expand Down Expand Up @@ -49,10 +49,6 @@ defineSlots<{
default?: (props: {}) => any,
}>()
const align = $computed(() => {
return userAlign ?? (vertical ? 'stretch' : 'start')
})
const style = $computed<HTMLAttributes['style']>(() => {
return {
'justify-content': ['start', 'end'].includes(justify) ? `flex-${justify}` : justify,
Expand Down

0 comments on commit c38632d

Please sign in to comment.