Skip to content

Commit

Permalink
fix(input): fixed textarea border
Browse files Browse the repository at this point in the history
  • Loading branch information
qianmoQ committed Nov 13, 2024
1 parent d191501 commit 588b8dd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
4 changes: 4 additions & 0 deletions docs/components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,14 @@ const input = ref('Hello View Shadcn UI')

## Textarea

::: raw

<CodeRunner title="Textarea">
<ShadcnInput placeholder="Input" v-model="input" type="textarea" />
</CodeRunner>

:::

::: details Show code

```vue
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "devlive-community",
"homepage": "https://github.com/devlive-community/view-shadcn-ui",
"private": false,
"version": "2024.4.0-alpha.1731413406",
"version": "2024.4.0-alpha.1731471659",
"license": "MIT",
"main": "./dist/view-shadcn.umd.ts",
"module": "./dist/view-shadcn.es.ts",
Expand Down
21 changes: 4 additions & 17 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
<template>
<ShadcnTab>
<ShadcnTabItem label="Tab 1" value="Tab 1">
<p>Tab 1 content</p>
</ShadcnTabItem>
<ShadcnTabItem label="Tab 2" value="Tab 2">
<p>Tab 2 content</p>
</ShadcnTabItem>
<ShadcnTabItem value="Tab 3" @on-click="console.log('Tab 3 clicked')">
<template #label>
<div class="flex items-center space-x-1">
<ShadcnIcon icon="Save"/>
<span>Label Slot</span>
</div>
</template>
<p>Tab 3 content</p>
</ShadcnTabItem>
</ShadcnTab>
<ShadcnInput v-model="input" placeholder="Input" type="textarea"/>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const input = ref('Hello View Shadcn UI')
</script>
2 changes: 1 addition & 1 deletion src/ui/input/ShadcnInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
v-bind="isTextarea
? { rows: props.rows, cols: props.cols }
: { type: currentType }"
:class="cn('w-full p-2 rounded',
:class="cn('w-full p-2 rounded outline-none border-none',
type !== 'textarea' && size && Size[size],
$slots.prefix && 'pl-6',
$slots.suffix && 'pr-6'
Expand Down

0 comments on commit 588b8dd

Please sign in to comment.