Skip to content

Commit

Permalink
Input addons uses svg icons. Fixes missing newline
Browse files Browse the repository at this point in the history
  • Loading branch information
roblevintennis committed Oct 11, 2020
1 parent 7a46f18 commit 2bea369
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 11 deletions.
2 changes: 1 addition & 1 deletion agnosticui-vue/src/stories/Input.stories.js
Expand Up @@ -276,4 +276,4 @@ export const Email = () => ({
methods: {
onEnter: (ev) => { console.log(ev) },
},
});
});
56 changes: 46 additions & 10 deletions showcase/src/partials/Inputs.vue
Expand Up @@ -256,16 +256,38 @@
uniqueId="inputWithAddons"
label="Input with addons"
>
<template v-slot:addonLeft
><InputAddonItem addonLeft
><span>L</span></InputAddonItem
></template
>
<template v-slot:addonRight
><InputAddonItem addonRight
><span>R</span></InputAddonItem
></template
>
<template v-slot:addonLeft>
<InputAddonItem addonLeft>
<svg
role="img"
class="input-addon-left demo-icon-check"
viewBox="0 0 16 16"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
>
<desc>Cross icon</desc>
<path
d="M14 2.5l-8.5 8.5-3.5-3.5-1.5 1.5 5 5 10-10z"
></path>
</svg>
</InputAddonItem>
</template>
<template v-slot:addonRight>
<InputAddonItem addonRight>
<svg
role="img"
class="input-addon-left demo-icon-cross"
viewBox="0 0 16 16"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
>
<desc>Checkmark icon</desc>
<path
d="M13.957 3.457l-1.414-1.414-4.543 4.543-4.543-4.543-1.414 1.414 4.543 4.543-4.543 4.543 1.414 1.414 4.543-4.543 4.543 4.543 1.414-1.414-4.543-4.543z"
></path>
</svg>
</InputAddonItem>
</template>
</AgInput>
</p>
</FlexCol>
Expand Down Expand Up @@ -336,4 +358,18 @@ export default {
.flex > div {
margin-bottom: var(--Space-16);
}
.demo-icon-cross,
.demo-icon-check {
width: 14px;
height: 14px;
}
.demo-icon-cross {
fill: tomato;
}
.demo-icon-check {
fill: lightseagreen;
}
</style>

0 comments on commit 2bea369

Please sign in to comment.