Skip to content

Commit

Permalink
Merge branch 'main' into feat/icons-new-structure
Browse files Browse the repository at this point in the history
  • Loading branch information
felipefialho authored Jul 17, 2023
2 parents eceadc2 + 0e7d341 commit ff1dd75
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packages/core": "0.1.0-alpha.17",
"packages/core": "0.1.0-alpha.22",
"packages/tokens": "0.1.0-alpha.21"
}
7 changes: 7 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.1.0-alpha.22](https://github.com/juntossomosmais/atomium/compare/atomium-v0.1.0-alpha.17...atomium-v0.1.0-alpha.22) (2023-07-17)


### Bug Fixes

* **button:** remove atom click and avoid native click when disabled ([#186](https://github.com/juntossomosmais/atomium/issues/186)) ([bef58a0](https://github.com/juntossomosmais/atomium/commit/bef58a048d68d282c674f23b8da9caeb61259dbd))

## [0.1.0-alpha.17](https://github.com/juntossomosmais/atomium/compare/atomium-v0.1.0-alpha.16...atomium-v0.1.0-alpha.17) (2023-06-26)


Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@juntossomosmais/atomium",
"version": "0.1.0-alpha.17",
"version": "0.1.0-alpha.22",
"description": "Core of web components for Atomium",
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
display: block;
}

:host(.is-disabled) {
pointer-events: none;
}

.atom-button {
text-transform: inherit;

Expand Down
10 changes: 2 additions & 8 deletions packages/core/src/components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Mode } from '@ionic/core'
import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core'
import { Component, Host, Prop, h } from '@stencil/core'

@Component({
tag: 'atom-button',
Expand All @@ -21,17 +21,12 @@ export class AtomButton {
@Prop() target?: string
@Prop() type: 'submit' | 'reset' | 'button' = 'button'

@Event() atomClick: EventEmitter

private handleClick = () => {
this.atomClick.emit()
}

render() {
return (
<Host
class={{
[`expand-${this.expand}`]: !!this.expand,
[`is-disabled`]: this.disabled,
}}
>
<ion-button
Expand All @@ -52,7 +47,6 @@ export class AtomButton {
rel={this.rel}
target={this.target}
download={this.download}
onClick={this.handleClick}
>
{this.loading && (
<span class="loading">
Expand Down
9 changes: 1 addition & 8 deletions packages/core/src/components/button/stories/button.args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Category } from '@atomium/storybook-utils/enums/table'
export const ButtonStoryArgs = {
parameters: {
actions: {
handles: ['atomClick'],
handles: ['click'],
},
docs: {
description: {
Expand Down Expand Up @@ -123,13 +123,6 @@ export const ButtonStoryArgs = {
category: Category.PROPERTIES,
},
},
atomClick: {
action: 'atomClick',
description: 'Emitted when the button is clicked.',
table: {
category: 'Events',
},
},
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ export const CircleButton: StoryObj = {
shape: 'circle',
},
}

export const Disabled: StoryObj = {
render: (args) => createButton(args),
args: {
...Primary.args,
disabled: true,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ export const CircleButton: StoryObj = {
shape: 'circle',
},
}

export const Disabled: StoryObj = {
render: (args) => createButton(args),
args: {
...Primary.args,
disabled: true,
},
}
2 changes: 1 addition & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"prerelease": true,
"release-as": "0.1.0-alpha.21",
"release-as": "0.1.0-alpha.22",
"packages": {
"packages/core": {},
"packages/tokens": {}
Expand Down

0 comments on commit ff1dd75

Please sign in to comment.