Skip to content

Commit

Permalink
fix colorful icons website
Browse files Browse the repository at this point in the history
  • Loading branch information
andronasef committed Mar 18, 2022
1 parent f29b9d9 commit df74358
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ import 'package:iconify_flutter/icons/zondicons.dart';
Zondicons.iconsList // List of all icons of VS Code icon set
```

## Important Note
## Important Notes

All icon sets are free but Some collections require attribution when used for commercial purposes. See [This List](https://github.com/iconify/icon-sets/blob/master/collections.md) of collections and their licenses.
- There is two diffrent versions of icons packages(package:colorful_iconify_flutter/icons/) colorful icons sets and (package:iconify_flutter/icons/) for un colorful icons sets. so please use the right package name

- All icon sets are free but Some collections require attribution when used for commercial purposes. See [This List](https://github.com/iconify/icon-sets/blob/master/collections.md) of collections and their licenses.

## Thanks to 🙏

Expand Down
21 changes: 18 additions & 3 deletions website/src/components/IconDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<p class="p-3" id="code">
import 'package:iconify_flutter/iconify_flutter.dart';
<br />
import 'package: {{ useCurrentCollection().value?.palette ? "colorful_iconify_flutter" : "iconify_flutter" }}/icons/{{ iconSetNameFile() }}.dart';
import 'package:{{ thisCollection?.palette ? "colorful_iconify_flutter" : "iconify_flutter" }}/icons/{{ iconSetNameFile() }}.dart';
<br />
<br />
Iconify({{ iconSetName() }}.{{ iconName() }}) // widget
Expand All @@ -36,10 +36,13 @@

<script setup lang='ts'>
import copyText from 'copy-text-to-clipboard'
import { CollectionMeta, getMeta } from '../data'
import { getTransformedId } from '../store'
import { useCurrentCollection } from '../store'
const reservedWords = ['assert', 'break', 'case', 'catch', 'class', 'const', 'continue', 'default', 'do', 'else', 'enum', 'extends', 'false', 'final', 'finally', 'for', 'if', 'in', 'is', 'new', 'null', 'rethrow', 'return', 'super', 'switch', 'this', 'throw', 'true', 'try', 'var', 'void', 'while', 'with', 'async', 'hide', 'on', 'show', 'sync', 'abstract', 'as', 'covariant', 'deferred', 'dynamic', 'export', 'extension', 'external', 'factory', 'function', 'get', 'implements', 'import', 'interface', 'library', 'mixin', 'operator', 'part', 'set', 'static', 'typedef', 'await', 'yield']
const thisCollection = ref<CollectionMeta | null>(null)
const props = defineProps({
icon: {
type: String,
Expand All @@ -48,12 +51,16 @@ const props = defineProps({
showCollection: {
type: Boolean,
required: true,
},
}
})
const copied = ref(false)
const transformedId = computed(() => getTransformedId(props.icon))
function iconsetid() {
return transformedId.value.split(":")[0]
}
function iconSetNameFile() {
return transformedId.value.split(':')[0].replace(/-/g, '_')
Expand Down Expand Up @@ -81,4 +88,12 @@ const copy = async () => {
}, 2000)
}
watch(transformedId, async () => {
thisCollection.value = (await getMeta(iconsetid()))
console.log(thisCollection.value?.palette)
})
</script>

0 comments on commit df74358

Please sign in to comment.