Skip to content

Commit

Permalink
fix(react-formio): Fix title, name, path calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Feb 24, 2021
1 parent 4b7c179 commit fd80da6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export const reducer = (

const update = (newValue: any): any => {
if (newValue.title !== state.current.title && !state.current._id) {
newValue.name = camelCase(value);
newValue.path = camelCase(value).toLowerCase();
newValue.name = camelCase(value.title);
newValue.path = camelCase(value.title).toLowerCase();
}

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const Sandbox = (args: any) => {

Sandbox.args = {
form: {
_id: "6023f8fe4b1a2ab9a3aae096",
type: "form",
tags: [],
owner: "5d0797a382461b6656d2c790",
Expand Down
4 changes: 2 additions & 2 deletions packages/tailwind-formio/styles/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ fieldset:disabled a.btn {
@apply text-gray-200 bg-transparent border-gray-100;

&:not(:disabled):not(.disabled) {
@apply hover:text-gray-800 hover:bg-gray-300 focus:bg-gray-300 hover:border-gray-300 focus:border-gray-300 focus:text-gray-800;
@apply hover:text-gray-800 hover:bg-gray-300 focus:bg-gray-300 hover:border-gray-300 focus:border-gray-300 focus:text-white;
}
}

.btn.btn-outline-dark {
@apply text-gray bg-transparent border-gray;

&:not(:disabled):not(.disabled) {
@apply hover:text-white hover:bg-gray-800 focus:bg-gray-800 hover:border-gray-800 focus:border-gray-800 focus:text-gray-800;
@apply hover:text-white hover:bg-gray-800 focus:bg-gray-800 hover:border-gray-800 focus:border-gray-800 focus:text-white;
}
}

Expand Down

0 comments on commit fd80da6

Please sign in to comment.