Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Range): new component #290

Merged
merged 22 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dist
.DS_Store
.history
.vercel
.idea
6 changes: 6 additions & 0 deletions .prettierrc.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the UI does not use a prettier, it uses Eslint ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can let it inside the project, so people who have the Prettier extension on VSCode can contribute easily?

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
7 changes: 7 additions & 0 deletions docs/components/content/examples/RangeExample.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script setup>
const value = ref(50)
</script>

<template>
<URange v-model.number="value" />
</template>
101 changes: 101 additions & 0 deletions docs/content/3.forms/8.range.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
github: true
description: Display a range field
navigation:
badge: "Edge"
---

## Usage

Use a `v-model` to make the Range reactive.

::component-example
#default
:range-example

#code
```vue
<script setup>
const value = ref(50)
</script>

<template>
<URange v-model="value" />
</template>
```
::

### Style

Use the `color` prop to change the visual style of the Range.

::component-card
---
baseProps:
name: range'
placeholder: 'Search...'
props:
color: 'primary'
---
::

### Size

Use the `size` prop to change the size of the Range.

::component-card
---
baseProps:
name: 'range'
props:
size: 'md'
---
::

### Disabled

Use the `disabled` prop to disable the Range.

::component-card
---
baseProps:
name: 'range'
props:
disabled: true
---
::

### Min and Max

Use the `min` and `max` prop to configure the Range.

::component-card
---
baseProps:
name: 'range'
props:
min: 0
max: 100
---
::

### Step

Use the `step` prop to change the step increment.

::component-card
---
baseProps:
name: 'range'
props:
step: 20
---
::

## Props

:component-props

## Preset

:component-preset
Loading