Skip to content

Commit

Permalink
chore(config): update test workflows
Browse files Browse the repository at this point in the history
fix(bulmil):  variable

chore(examples): Update Next & Nuxt examples
  • Loading branch information
Gomah committed Jun 13, 2020
1 parent 1e5c699 commit b99fb64
Show file tree
Hide file tree
Showing 10 changed files with 4,100 additions and 3,648 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ workflows:
build:
jobs:
- build
# test:
# jobs:
# - test
test:
jobs:
- test
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Thomas Marrec
Copyright (c) 2019-2020 Thomas Marrec

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"dependencies": {
"bulmil": "latest",
"next": "^9.1.6",
"react": "^16.12.0",
"react-dom": "^16.12.0"
"next": "^9.4.4",
"react": "^16.13.1",
"react-dom": "^16.13.1"
}
}
18 changes: 14 additions & 4 deletions examples/next/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Home extends React.Component {
this.state = {
color: 'is-primary',
size: null,
light: false,
outlined: false,
};

this.colors = [
Expand All @@ -27,20 +29,28 @@ class Home extends React.Component {
this.sizes = ['is-large', 'is-medium', 'is-small', null];
}

handleButtonClick = e => {
const sizes = this.sizes.filter(s => s !== this.state.size);
const colors = this.colors.filter(c => c !== this.state.color);
handleButtonClick = (e) => {
const sizes = this.sizes.filter((s) => s !== this.state.size);
const colors = this.colors.filter((c) => c !== this.state.color);

this.setState({
color: colors[Math.floor(Math.random() * this.colors.length)],
size: sizes[Math.floor(Math.random() * this.sizes.length)],
outlined: Math.floor(Math.random() * 10) >= 5,
light: Math.floor(Math.random() * 10) >= 5,
});
};

render() {
return (
<div className="container">
<bm-button size={this.state.size} color={this.state.color} onClick={this.handleButtonClick}>
<bm-button
is-outlined={this.state.outlined}
is-light={this.state.light}
size={this.state.size}
color={this.state.color}
onClick={this.handleButtonClick}
>
Click Me!
</bm-button>

Expand Down
Binary file removed examples/next/static/favicon.ico
Binary file not shown.
4,939 changes: 2,539 additions & 2,400 deletions examples/next/yarn.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
},
"dependencies": {
"bulmil": "latest",
"nuxt": "^2.11.0",
"nuxt": "^2.12.2",
"nuxt-stencil": "^0.1.1"
},
"devDependencies": {
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1"
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"prettier": "^2.0.5"
}
}
12 changes: 11 additions & 1 deletion examples/nuxt/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<template>
<div class="container">
<bm-button :color="color" :size="size" @click="changeMe">
<bm-button
:color="color"
:size="size"
:is-light="light"
:is-outlined="outlined"
@click="changeMe"
>
Click Me!
</bm-button>
</div>
Expand All @@ -12,6 +18,8 @@ export default {
text: 'Click Me!',
size: null,
color: 'is-primary',
outlined: false,
light: false,
colors: [
'is-primary',
'is-link',
Expand All @@ -33,6 +41,8 @@ export default {
changeMe() {
const sizes = this.sizes.filter(s => s !== this.size)
const colors = this.colors.filter(c => c !== this.color)
this.outlined = Math.floor(Math.random() * 10) >= 5
this.light = Math.floor(Math.random() * 10) >= 5
this.color = colors[Math.floor(Math.random() * colors.length)]
this.size = sizes[Math.floor(Math.random() * sizes.length)]
}
Expand Down
Loading

0 comments on commit b99fb64

Please sign in to comment.