Skip to content

Commit 04cd77b

Browse files
committed
Docs: translate "cookbook/editable-svg-icons.md"
1 parent 1da48f8 commit 04cd77b

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/cookbook/editable-svg-icons.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Editable SVG Icon Systems
1+
# Sistemas de Ícones SVG Editáveis
22

3-
## Base Example
3+
## Exemplo Base
44

5-
There are many ways to create an SVG Icon System, but one method that takes advantage of Vue's capabilities is to create editable inline icons as components. Some of the advantages of this way of working is:
5+
Existem muitas formas de criar um sistema de ícone SVG, mas o método que tira vantagem das capacidades do Vue é criar ícones *inline* editáveis como componente. Algumas das vantagens desta forma de trabalhar são:
66

7-
- They are easy to edit on the fly
8-
- They are animatable
9-
- You can use standard props and defaults to keep them to a typical size or alter them if you need to
10-
- They are inline, so no HTTP requests are necessary
11-
- They can be made accessible dynamically
7+
- São fáceis de se editar em tempo real
8+
- São animáveis
9+
- Pode se usar props, definindo padrões ou alterando-as caso necessário
10+
- São incorporados, então não exigem requisições HTTP adicionais
11+
- Eles podem ser acessados dinamicamente
1212

13-
First, we'll create a folder for all of the icons, and name them in a standardized fashion for easy retrieval:
13+
Primeiro, vamos criar uma pasta para todos os ícones, e nomeá-los de forma padronizada para fácil recuperação:
1414

1515
- `components/icons/IconBox.vue`
1616
- `components/icons/IconCalendar.vue`
1717
- `components/icons/IconEnvelope.vue`
1818

19-
Here's an example repo to get you going, where you can see the entire setup: [https://github.com/sdras/vue-sample-svg-icons/](https://github.com/sdras/vue-sample-svg-icons/)
19+
Eis um exemplo de repositório, onde pode ver toda a configuração: [https://github.com/sdras/vue-sample-svg-icons/](https://github.com/sdras/vue-sample-svg-icons/)
2020

2121
![Documentation site](https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/screendocs.jpg 'Docs demo')
2222

23-
We'll create a base icon (`IconBase.vue`) component that uses a slot.
23+
Vamos criar um componente de ícone base (`IconBase.vue`) que usa um `slot`.
2424

2525
```html
2626
<template>
@@ -40,9 +40,9 @@ We'll create a base icon (`IconBase.vue`) component that uses a slot.
4040
</template>
4141
```
4242

43-
You can use this base icon as is- the only thing you might need to update is the `viewBox` depending on the `viewBox` of your icons. In the base, we're making the `width`, `height`, `iconColor`, and name of the icon props so that it can be dynamically updated with props. The name will be used for both the `<title>` content and its `id` for accessibility.
43+
Você pode usar essa base de ícones do jeito que está – a única coisa que você pode precisar atualizar é a e `viewBox` dependendo da `viewBox` dos ícones que for utilizar. Na base, vamos usar propriedades para `width`, `height`, `iconColor`, e `iconColor`, para que possam ser atualizados dinamicamente. O nome será usado tanto para o conteúdo do `<title>` como do `id` para acessilibidade.
4444

45-
Our script will look like this, we'll have some defaults so that our icon will be rendered consistently unless we state otherwise:
45+
Nosso script ficará assim, teremos alguns valores padrão para que nosso ícone seja renderizado de forma consistente, a menos que declaremos o contrário:
4646

4747
```js
4848
export default {
@@ -67,30 +67,30 @@ export default {
6767
}
6868
```
6969

70-
The `currentColor` property that's the default on the fill will make the icon inherit the color of whatever text surrounds it. We could also pass in a different color as a prop if we wish.
70+
A propriedade `currentColor` , usada como padrão para o preenchimento, irá permitir ao ícone herdar a cor do texto que o rodeia. Também poderíamos passar uma cor diferente como `prop` se quisermos.
7171

72-
We can use it like so, with the only contents of `IconWrite.vue` containing the paths inside the icon:
72+
Podemos usá-lo assim, com o único conteúdo de `IconWrite.vue` contendo os `path` dentro do ícone:
7373

7474
```html
7575
<icon-base icon-name="write"><icon-write /></icon-base>
7676
```
7777

78-
Now, if we'd like to make many sizes for the icon, we can do so very easily:
78+
Agora, se quisermos fazer vários tamanhos para o ícone, podemos fazer isso facilmente:
7979

8080
```html
8181
<p>
82-
<!-- you can pass in a smaller `width` and `height` as props -->
82+
<!-- pode-se passar um `width` e `height` mais pequenos como props -->
8383
<icon-base width="12" height="12" icon-name="write"><icon-write /></icon-base>
84-
<!-- or you can use the default, which is 18 -->
84+
<!-- ou você pode usar o padrão, que é 18 -->
8585
<icon-base icon-name="write"><icon-write /></icon-base>
86-
<!-- or make it a little bigger too :) -->
86+
<!-- ou torná-lo um pouco maior também :) -->
8787
<icon-base width="30" height="30" icon-name="write"><icon-write /></icon-base>
8888
</p>
8989
```
9090

9191
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/Screen%20Shot%202018-01-01%20at%204.51.40%20PM.png" width="450" />
9292

93-
## Animatable Icons
93+
## Ícones Animáveis
9494

9595
Keeping icons in components comes in very handy when you'd like to animate them, especially on an interaction. Inline SVGs have the highest support for interaction of any method. Here's a very basic example of an icon that's animated on click:
9696

0 commit comments

Comments
 (0)