Skip to content

Commit

Permalink
chore: document size prop
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jan 23, 2024
1 parent c880ccb commit 778f3d1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
root = true
root=true

[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
insert_final_newline=true
7 changes: 4 additions & 3 deletions packages/vue-resizor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ const indicators = ref<Indicator[]>()

## Available Props

| prop | type (range) | default value |
| ------------ | ------------- | ------------- |
| `indicators` | `Indicator[]` | N/A |
| prop | type (range) | default value |
| ------------ | --------------------------------- | ------------- |
| `indicators` | `Indicator[]` | N/A |
| `size` | `number` (indicator width/height) | `2` |

## Available Events

Expand Down
7 changes: 4 additions & 3 deletions packages/vue-resizor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ const indicators = ref<Indicator[]>()

## Available Props

| prop | type (range) | default value |
| ------------ | ------------- | ------------- |
| `indicators` | `Indicator[]` | N/A |
| prop | type (range) | default value |
| ------------ | --------------------------------- | ------------- |
| `indicators` | `Indicator[]` | N/A |
| `size` | `number` (indicator width/height) | `2` |

## Available Events

Expand Down
7 changes: 5 additions & 2 deletions packages/vue-resizor/src/Resizor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ const bem = new Bem('vue-resizor')
export default defineComponent({
props: {
indicators: Array<Indicator>,
size: Number,
size: {
type: Number,
default: 2,
},
},
setup(props, context) {
const slots = context.slots as Required<ResizableSlots>
Expand Down Expand Up @@ -162,7 +165,7 @@ export default defineComponent({
left,
[horizontal ? 'height' : 'width']: '100%',
[`border-${horizontal ? 'left' : 'top'}-width`]: pixel(
props.size ?? 2,
props.size,
),
}}
draggable
Expand Down

0 comments on commit 778f3d1

Please sign in to comment.