-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from vue-a11y/support-new-props
Add Support for Position, Avatar, and Opacity Props in VLibras Widget
- Loading branch information
Showing
3 changed files
with
143 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,79 @@ | ||
<script setup> | ||
import Nucleus from 'nucleus-vue'; | ||
import Nucleus, { NucleusCode } from 'nucleus-vue'; | ||
import { configApp } from './App.config'; | ||
</script> | ||
|
||
<template> | ||
<Nucleus :config="configApp"> | ||
<VLibras /> | ||
<div class="content example"> | ||
<h2>Usage Example</h2> | ||
|
||
<h3>Widget Position</h3> | ||
<p>You can set the widget's position using the <code>position</code> prop. For example:</p> | ||
<NucleusCode language="tsx">{{ `<VLibras position="left" />` }}</NucleusCode> | ||
|
||
<h3>Available Position Types</h3> | ||
<p>The position options that can be used are:</p> | ||
<ul> | ||
<li>left</li> | ||
<li>right</li> | ||
<li>top</li> | ||
<li>bottom</li> | ||
<li>bottom-left</li> | ||
<li>top-left</li> | ||
<li>bottom-right</li> | ||
<li>top-right</li> | ||
</ul> | ||
|
||
<h3>Avatar</h3> | ||
<p>You can select the widget's avatar using the <code>avatar</code> prop. Example:</p> | ||
<NucleusCode language="tsx">{{ `<VLibras avatar="hosana" />` }}</NucleusCode> | ||
|
||
<h3>Available Avatar Options</h3> | ||
<ul> | ||
<li>icaro</li> | ||
<li>hosana</li> | ||
<li>guga</li> | ||
<li>random</li> | ||
</ul> | ||
|
||
<h3>Opacity</h3> | ||
<p>To adjust the widget's opacity, use the <code>opacity</code> prop:</p> | ||
<NucleusCode language="tsx">{{ `<VLibras opacity="0.8" />` }}</NucleusCode> | ||
</div> | ||
|
||
</Nucleus> | ||
</template> | ||
|
||
<style> | ||
.example { | ||
h2, | ||
h3 { | ||
color: var(--color-text); | ||
margin-bottom: 10px; | ||
} | ||
p { | ||
color: var(--color-text); | ||
line-height: 1.6; | ||
margin-bottom: 20px; | ||
} | ||
ul { | ||
padding-left: 20px; | ||
margin-bottom: 20px; | ||
} | ||
ul li { | ||
list-style-type: disc; | ||
margin-bottom: 5px; | ||
color: var(--primary); | ||
font-weight: bold; | ||
} | ||
code { | ||
margin-bottom: 1rem; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters