feat(site-builder): form blocks default to palette tokens
Refs #44 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d70f4933af
commit
af43af7dc1
6 files changed
+53
-14
No files matched your search
@@ -79,3 +79,17 @@ describe('SubscribeForm.craft.props includes animation/visibility defaults', ()
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('SubscribeForm.toHtml palette token fallbacks (Refs #44)', () => {
|
||||
test('buttonColor absent -> primary token; heading/input text -> text token', () => {
|
||||
const { html } = toHtml({ heading: 'Join us' }, '');
|
||||
expect(html).toContain('background-color:var(--wsb-primary)');
|
||||
expect(html).toContain('color:var(--wsb-text)');
|
||||
expect(html).not.toContain('#3b82f6');
|
||||
expect(html).not.toContain('#1f2937');
|
||||
});
|
||||
test('explicit buttonColor wins', () => {
|
||||
const { html } = toHtml({ buttonColor: '#ff0000' }, '');
|
||||
expect(html).toContain('background-color:#ff0000');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user