diff --git a/packages/webawesome/docs/docs/frameworks/angular.md b/packages/webawesome/docs/docs/frameworks/angular.md index 517418095..3f22c9b5a 100644 --- a/packages/webawesome/docs/docs/frameworks/angular.md +++ b/packages/webawesome/docs/docs/frameworks/angular.md @@ -15,7 +15,7 @@ Angular [plays nice](https://custom-elements-everywhere.com/#angular) with custo To add Web Awesome to your Angular app, install the package from npm. ```bash -npm install @shoelace-style/shoelace +npm install @awesome.me/webawesome ``` ### Update the Angular Configuration @@ -32,28 +32,14 @@ Its also important to load the components by using a ` @@ -58,24 +52,24 @@ One caveat is there's currently Svelte only supports `bind:value` directive in ` ```jsx // ❌ These do not work - + - - Designer - Developer - + + Designer + Developer + // ✅ These are a bit longer, but work - name = event.target.value}> + name = event.target.value}> - job = event.target.value}> - Designer - Developer - + job = event.target.value}> + Designer + Developer + ``` :::tip -Are you using Web Awesome with Svelte? [Help us improve this page!](https://github.com/shoelace-style/shoelace/blob/next/docs/frameworks/svelte.md) +Are you using Web Awesome with Svelte? [Help us improve this page!](https://github.com/shoelace-style/webawesome/blob/next/docs/frameworks/svelte.md) ::: ### Slots @@ -85,12 +79,12 @@ Slots in Web Awesome/web components are functionally the same as basic slots in Here is an example: ```jsx - + This drawer slides in from the start.
- (drawerIsOpen = false)}> + (drawerIsOpen = false)}> Close - +
-
+ ``` \ No newline at end of file diff --git a/packages/webawesome/docs/docs/frameworks/vue-2.md b/packages/webawesome/docs/docs/frameworks/vue-2.md index 5b42e54f0..6704f7f55 100644 --- a/packages/webawesome/docs/docs/frameworks/vue-2.md +++ b/packages/webawesome/docs/docs/frameworks/vue-2.md @@ -17,31 +17,26 @@ These instructions are for Vue 2. If you're using Vue 3 or above, please see the To add Web Awesome to your Vue app, install the package from npm. ```bash -npm install @shoelace-style/shoelace +npm install @awesome.me/webawesome ``` -Next, [include a theme](/getting-started/themes) and set the [base path](/getting-started/installation#setting-the-base-path) for icons and other assets. In this example, we'll import the light theme and use the CDN as a base path. +Next, import the Web Awesome stylesheet, import the components you need, and then start using Web Awesome! ```jsx -import '@shoelace-style/shoelace/%NPMDIR%/themes/light.css'; -import { setBasePath } from '@shoelace-style/shoelace/%NPMDIR%/utilities/base-path'; - -setBasePath('https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/'); +// main.js or main.ts +import '@awesome.me/webawesome/dist/styles/webawesome.css'; +import '@awesome.me/webawesome/dist/components/button/button.js'; ``` -:::tip -If you'd rather not use the CDN for assets, you can create a build task that copies `node_modules/@shoelace-style/shoelace/dist/assets` into a public folder in your app. Then you can point the base path to that folder instead. -::: - ## Configuration -You'll need to tell Vue to ignore Web Awesome components. This is pretty easy because they all start with `sl-`. +You'll need to tell Vue to ignore Web Awesome components. This is pretty easy because they all start with `wa-`. ```js import Vue from 'vue'; import App from './App.vue'; -Vue.config.ignoredElements = [/sl-/]; +Vue.config.ignoredElements = [/wa-/]; const app = new Vue({ render: h => h(App) @@ -59,7 +54,7 @@ Now you can start using Web Awesome components in your app! When binding complex data such as objects and arrays, use the `.prop` modifier to make Vue bind them as a property instead of an attribute. ```html - + ``` ### Two-way Binding @@ -68,9 +63,9 @@ One caveat is there's currently [no support for v-model on custom elements](http ```html - + - + ``` If that's too verbose for your liking, you can use a custom directive instead. [This utility](https://www.npmjs.com/package/@shoelace-style/vue-sl-model) adds a custom directive that will work just like `v-model` but for Web Awesome components. To install it, use this command. @@ -87,7 +82,7 @@ import Web AwesomeModelDirective from '@shoelace-style/vue-sl-model'; import App from './App.vue'; Vue.use(Web AwesomeModelDirective); -Vue.config.ignoredElements = [/sl-/]; +Vue.config.ignoredElements = [/wa-/]; const app = new Vue({ render: h => h(App) @@ -99,9 +94,9 @@ app.$mount('#app'); Now you can use the `v-sl-model` directive to keep your data in sync! ```html - + ``` :::tip -gre you using Web Awesome with Vue? [Help us improve this page!](https://github.com/shoelace-style/shoelace/blob/next/docs/frameworks/vue-2.md) +Are you using Web Awesome with Vue 2? [Help us improve this page!](https://github.com/shoelace-style/shoelace/blob/next/docs/frameworks/vue-2.md) ::: \ No newline at end of file diff --git a/packages/webawesome/docs/docs/frameworks/vue.md b/packages/webawesome/docs/docs/frameworks/vue.md index 4ca06cf35..c5775702c 100644 --- a/packages/webawesome/docs/docs/frameworks/vue.md +++ b/packages/webawesome/docs/docs/frameworks/vue.md @@ -20,11 +20,12 @@ To add Web Awesome to your Vue app, install the package from npm. npm install @awesome.me/webawesome ``` -Next, [include a theme](/getting-started/themes) and set the [base path](/getting-started/installation#setting-the-base-path) for icons and other assets. In this example, we'll import the light theme and use the CDN as a base path. +Next, import the Web Awesome stylesheet, import the components you need, and then start using Web Awesome! -```js +```jsx // main.js or main.ts -import '@awesome.me/webawesome/dist/themes/default.css'; +import '@awesome.me/webawesome/dist/styles/webawesome.css'; +import '@awesome.me/webawesome/dist/components/button/button.js'; ``` ## Configuration @@ -95,7 +96,7 @@ One caveat is there's currently [no support for v-model on custom elements](http ``` -If that's too verbose for your liking, you can use a custom directive instead. [This utility](https://www.npmjs.com/package/@shoelace-style/vue-sl-model) adds a custom directive that will work just like `v-model` but for Web Awesome components. +If that's too verbose for your liking, you can use a custom directive instead. [This utility](https://www.npmjs.com/package/@shoelace-style/vue-wa-model) adds a custom directive that will work just like `v-model` but for Web Awesome components. ### Slots