Skip to content

Commit

Permalink
docs: update alert docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oil-oil authored Aug 24, 2023
2 parents e965e36 + 8742d40 commit 1afdb65
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,6 @@ In this example you can click on the buttons and dynamically change the color va

Add an icon to the alert easily with the slot **icon**

<VsAlert color="warn" >
<template #title>
Default Icons
</template>
Vuesax does not use any library or default icon source, with this we give you the freedom to use the one you prefer All the components that use a default icon somewhere like the close one in an <b>Alert</b> or a <b>Popup</b> will be an <b>svg</b> for not having to install any type of external font, and it can be replaced with an icon of your preference<code style="padding: .25rem .5rem;font-size:.85rem;background-color:var(--vs-theme-bg2);border-radius: 3px;">slot="icon"</code>
</VsAlert>

<VsAlert color="success" style="margin:10px 0 0 0 ">
<template #title>
Vuesax Docs Icons
</template>
These documents and examples use the <a href="https://boxicons.com/" target="_blank">boxicons</a> component library, it is not mandatory or necessary for the use of Vuesax but we recommend it for its wide range of icons and how they visually complement the framework
</VsAlert>

</card>

<card subtitle="Title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,27 +169,6 @@ If you need an icon-only button use the `icon` property, the property is a `bool

This property makes the button have a specific size making it the same width and height, do not use when it is icon and text

<div>
<div>
<div class="warning custom-block">
<p class="custom-block-title">
Iconos por defecto
</p>
<p>
Vuesax no usa ninguna librería o fuente de iconos por defecto, con esto damos la libertad de usar la que prefieras Todos los componentes que usen en algún lugar un icono por defecto como el de close en un <b>Alert</b> o un <b>Popup</b> va a ser un <b>svg</b> para no tener que instalar ningún tipo de fuente externa, y se podrá sustituir con un <code>slot="icon"</code> por el icono de su preferencia
</p>
</div>
<div class="tip custom-block">
<p class="custom-block-title">
Vuesax Docs Icons
</p>
<p>
Estos documentos y los ejemplos usan la libreria de componentes <a target="_blank" href="https://boxicons.com/">boxicons</a>, no es obligatoria o necesaria para el uso de Vuesax pero la recomendamos por su amplia gama de iconos y como complementan visualmente el framework
</p>
</div>
</div>
</div>

</Card>

<Card subtitle="IconText">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,7 @@ Alert 组件是用于显示重要信息的组件。通常使用弹出框或滑

## Icon

使用 slot 可以简单将图标添加到 Alert
**icon**

<VsAlert color="warn" >
<template #title>
Default Icons
</template>
Vuesax does not use any library or default icon source, with this we give you the freedom to use the one you prefer All the components that use a default icon somewhere like the close one in an <b>Alert</b> or a <b>Popup</b> will be an <b>svg</b> for not having to install any type of external font, and it can be replaced with an icon of your preference<code style="padding: .25rem .5rem;font-size:.85rem;background-color:var(--vs-theme-bg2);border-radius: 3px;">slot="icon"</code>
</VsAlert>

<VsAlert color="success" style="margin:10px 0 0 0 ">
<template #title>
Vuesax Docs Icons
</template>
These documents and examples use the <a href="https://boxicons.com/" target="_blank">boxicons</a> component library, it is not mandatory or necessary for the use of Vuesax but we recommend it for its wide range of icons and how they visually complement the framework
</VsAlert>
使用 slot 可以轻松将图标添加到警告组件

</card>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { VsButton } from 'vuesax-ts'
const HomeContent = defineComponent({
name: 'HomeContent',
setup() {
const { site, frontmatter, isDark, lang } = useData()
const { site, frontmatter, lang } = useData()
const router = useRouter()
const to = () => {
router.go('/documentation/components/button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script setup lang="ts">
import { ref } from 'vue'
import { VsAlert } from 'vuesax-ts'
import { VsAlert, VsButton } from 'vuesax-ts'
const activeShow = ref(true)
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script setup lang="ts">
import { ref } from 'vue'
import { VsAlert } from 'vuesax-ts'
import { VsAlert, VsButton } from 'vuesax-ts'
const activeShow = ref(true)
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
:active="color === 'success'"
@click="color = 'success'"
flat
success
color="success"
>Success</VsButton
>
<VsButton
:active="color === 'danger'"
@click="color = 'danger'"
flat
danger
color="danger"
>Danger</VsButton
>
<VsButton
Expand Down Expand Up @@ -65,9 +65,9 @@

<script setup lang="ts">
import { ref } from 'vue'
import { VsAlert } from 'vuesax-ts'
import { Color, VsAlert, VsButton } from 'vuesax-ts'
const color = ref('primary')
const color = ref<Color>('primary')
</script>

<style scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
</template>

<script setup lang="ts">
import { VsAlert } from 'vuesax-ts'
import { VsAlert, VsButton } from 'vuesax-ts'
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script setup lang="ts">
import { ref } from 'vue'
import { VsAlert } from 'vuesax-ts'
import { VsAlert, VsButton } from 'vuesax-ts'
const progress = ref(0)
const active = ref(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { VsRadio, VsPagination, Color } from 'vuesax-ts'
const page = ref(1)
const color = ref<Color>('success')
</script>
<style lang="scss">
.con-pagination {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Button', () => {
cy.mount(<VsButton color={status as Color}>{status}</VsButton>)
cy.get('.vs-button')
.should('have.attr', 'style')
.and('include', `--vs-color:${color};`)
.and('include', `--vs-color: ${color};`)
})
})

Expand Down
13 changes: 7 additions & 6 deletions packages/vuesax/src/components/button/base/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,7 @@
padding: 10px;
}
}
&--circle {
border-radius: 25px;
}
&--square {
border-radius: 0px;
}

&--size-xl {
border-radius: 20px;
.vs-button__content {
Expand Down Expand Up @@ -253,6 +248,12 @@
}
}
}
&--circle {
border-radius: 25px;
}
&--square {
border-radius: 0px;
}
}

// Type Button Style
Expand Down

0 comments on commit 1afdb65

Please sign in to comment.