Skip to content

Commit

Permalink
type BuilderColorPicker
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisGe committed Dec 20, 2024
1 parent 404c9f9 commit abd770e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
BuilderComponent,
} from "./utils";

export class BuilderColorpicker extends Component {
static template = "html_builder.BuilderColorpicker";
export class BuilderColorPicker extends Component {
static template = "html_builder.BuilderColorPicker";
static props = {
...basicContainerBuilderComponentProps,
unit: { type: String, optional: true },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">

<t t-name="html_builder.BuilderColorpicker">
<t t-name="html_builder.BuilderColorPicker">
<BuilderComponent dependencies="props.dependencies">
<div>
<ColorSelector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BuilderButton } from "./builder_button";
import { BuilderNumberInput } from "./builder_number_input";
import { BuilderSelect } from "./builder_select";
import { BuilderSelectItem } from "./builder_select_item";
import { BuilderColorpicker } from "./builder_colorpicker";
import { BuilderColorPicker } from "./builder_colorpicker";
import { BuilderTextInput } from "./builder_text_input";
import { BuilderCheckbox } from "./builder_checkbox";

Expand All @@ -18,7 +18,7 @@ export const defaultBuilderComponents = {
BuilderButton,
BuilderTextInput,
BuilderNumberInput,
BuilderColorpicker,
BuilderColorPicker,
BuilderSelect,
BuilderSelectItem,
BuilderCheckbox,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</BuilderSelect>
</BuilderRow>
<BuilderRow label.translate="Colors">
<BuilderColorpicker applyTo="'.progress-bar'" styleAction="'background-color'"/>
<BuilderColorPicker applyTo="'.progress-bar'" styleAction="'background-color'"/>
</BuilderRow>
<BuilderRow label.translate="Striped">
<BuilderCheckbox id="'striped_option'" classAction="'progress-bar-striped'" applyTo="'.progress-bar'"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<t t-name="html_builder.SectionBackgroundOption">
<BuilderRow label.translate="Background">
<BuilderColorpicker />
<BuilderColorPicker />
</BuilderRow>
</t>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defineWebsiteModels();
test("should apply color to the editing element", async () => {
addOption({
selector: ".test-options-target",
template: xml`<BuilderColorpicker/>`,
template: xml`<BuilderColorPicker/>`,
});
await setupWebsiteBuilder(`<div class="test-options-target">b</div>`);
await contains(":iframe .test-options-target").click();
Expand All @@ -26,7 +26,7 @@ test("hide/display base on applyTo", async () => {
});
addOption({
selector: ".parent-target",
template: xml`<BuilderColorpicker applyTo="'.my-custom-class'"/>`,
template: xml`<BuilderColorPicker applyTo="'.my-custom-class'"/>`,
});
const { getEditor } = await setupWebsiteBuilder(
`<div class="parent-target"><div class="child-target b">b</div></div>`
Expand Down

0 comments on commit abd770e

Please sign in to comment.