Skip to content

Commit

Permalink
fix: unsuported pnpm version of angular project / base scss tokens
Browse files Browse the repository at this point in the history
TODO: Better define tookens values
  • Loading branch information
rjborba committed Jun 29, 2024
1 parent f3a9d28 commit c6f7119
Show file tree
Hide file tree
Showing 44 changed files with 849 additions and 118 deletions.
8 changes: 6 additions & 2 deletions apps/demo-react/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import './App.css'
import { defineCustomElements } from 'ui-stencil-react'
import { defineCustomElements, SearchBox } from 'ui-stencil-react'

// import {} from 'ui-stencil-react'

void defineCustomElements()

Expand All @@ -13,7 +15,9 @@ function App() {

<section>
<h2>Stencil Components</h2>
<div className="component-row">{/* <MyButton></MyButton> */}</div>
<div className="component-row">
<SearchBox theme={{ colors: { light: { primaryColor: 'red' }, dark: { primaryColor: '#fff' } } }} />
</div>
</section>
</main>
</>
Expand Down
20 changes: 0 additions & 20 deletions apps/storybook/stories/my-button.stories.tsx

This file was deleted.

37 changes: 37 additions & 0 deletions apps/storybook/stories/search-box.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import type { StoryObj, Meta } from '@storybook/html'

// More on how to set up stories at: https://storybook.js.org/docs/html/writing-stories/introduction#default-export
const meta = {
title: 'SearchBox',
tags: ['autodocs']
} satisfies Meta

export default meta
type Story = StoryObj

const Template = (props) => {
console.log(props)

// biome-ignore lint/suspicious/noExplicitAny: <explanation>
const element = document.createElement('search-box') as any
element.theme = props.theme

return element
}

// More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args
export const Button: Story = {
render: Template,
args: {
theme: {
colors: {
light: {
primaryColor: 'red'
},
dark: {
primaryColor: 'blue'
}
}
}
}
}
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"enabled": true,
"rules": {
"nursery": {
"noConsole": "error"
"noConsole": "off"
},
"recommended": true,
"a11y": { "noAutofocus": "off" },
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-stencil-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.1",
"ng-packagr": "^18.0.0",
"typescript": "^5.5.2"
"typescript": "^5.4.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import { Components } from 'ui-stencil';


@ProxyCmp({
inputs: ['color', 'theme']
})
@Component({
selector: 'search-box',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: [],
inputs: ['color', 'theme'],
})
export class SearchBox {
protected el: HTMLElement;
Expand Down

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

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

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

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

Loading

0 comments on commit c6f7119

Please sign in to comment.