Skip to content

Commit

Permalink
Merge pull request #8412 from shashkovdanil/neoloading-tailwindcss
Browse files Browse the repository at this point in the history
NeoLoading to tailwindcss and added icons to historie
  • Loading branch information
roiLeo authored Dec 5, 2023
2 parents 7e01215 + 5c309ca commit cc532ae
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 8 deletions.
2 changes: 2 additions & 0 deletions libs/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"vite": "^4.5.0"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/vue-fontawesome": "^3.0.5",
"@google/model-viewer": "^3.3.0",
"@vueuse/core": "^9.13.0",
"bulma": "0.9.4",
Expand Down
7 changes: 1 addition & 6 deletions libs/ui/src/components/NeoLoading/NeoLoading.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@import '../../scss/theme';
@import '@oruga-ui/oruga-next/src/scss/utilities/expressions.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/variables.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/animations.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/helpers.scss';
@import '../../scss/variable.scss';

$loading-overlay: rgb(0 0 0 / 0.5);

@import '@oruga-ui/oruga-next/src/scss/components/loading.scss';

.o-load__overlay {
background-color: rgba(0, 0, 0, 0.5);
}
2 changes: 1 addition & 1 deletion libs/ui/src/components/NeoLoading/NeoLoading.story.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Story title="NeoLoading" :layout="{ type: 'grid', width: '200px' }">
<Variant title="Loading">
<NeoLoading> Neo Loader</NeoLoading>
<NeoLoading :active="true" />
</Variant>
</Story>
</template>
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/src/components/NeoLoading/NeoLoading.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<OLoading v-bind="$attrs">
<slot>
<NeoIcon icon="spinner-third" spin size="large" class="has-text-white" />
<NeoIcon icon="spinner-third" spin size="large" class="text-white" />
</slot>
</OLoading>
</template>
Expand Down
27 changes: 27 additions & 0 deletions libs/ui/src/histoire.setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
import './histoire.scss'

import { defineSetupVue3 } from '@histoire/plugin-vue'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { Neo } from './'

export const setupVue3 = defineSetupVue3(({ app }) => {
const script = document.createElement('script')
script.src = 'https://kit.fontawesome.com/54f29b7997.js'
script.crossOrigin = 'anonymous'
script.async = true

document.body.appendChild(script)

app.component('FontAwesomeIcon', FontAwesomeIcon).use(Neo, {
customIconPacks: {
fass: {
iconPrefix: 'fa-fw fa-',
},
fasr: {
iconPrefix: 'fa-fw fa-',
},
fab: {
iconPrefix: 'fa-fw fa-',
},
},
})
})
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc532ae

Please sign in to comment.