-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add stylesheets recipe * Add tab to app * Fix deploy * Fix deploy
- Loading branch information
Showing
18 changed files
with
131 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
force-app/main/default/flexipages/Styling.flexipage-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<flexiPageRegions> | ||
<name>region1</name> | ||
<type>Region</type> | ||
</flexiPageRegions> | ||
<flexiPageRegions> | ||
<itemInstances> | ||
<componentInstance> | ||
<componentName>stylesheets</componentName> | ||
<identifier>c_stylesheets</identifier> | ||
</componentInstance> | ||
</itemInstances> | ||
<name>region2</name> | ||
<type>Region</type> | ||
</flexiPageRegions> | ||
<flexiPageRegions> | ||
<itemInstances> | ||
<componentInstance> | ||
<componentName>stylingHooks</componentName> | ||
<identifier>c_stylingHooks</identifier> | ||
</componentInstance> | ||
</itemInstances> | ||
<name>region3</name> | ||
<type>Region</type> | ||
</flexiPageRegions> | ||
<flexiPageRegions> | ||
<name>region4</name> | ||
<type>Region</type> | ||
</flexiPageRegions> | ||
<masterLabel>Styling</masterLabel> | ||
<template> | ||
<name>flexipage:appHomeTemplateHeaderThreeColumns</name> | ||
</template> | ||
<type>AppPage</type> | ||
</FlexiPage> |
3 changes: 0 additions & 3 deletions
3
force-app/main/default/lwc/miscStylingHooks/miscStylingHooks.js
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
force-app/main/default/lwc/stylesheets/__tests__/stylesheets.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { createElement } from 'lwc'; | ||
import Stylesheets from 'c/stylesheets'; | ||
|
||
describe('c-misc-stylesheets', () => { | ||
afterEach(() => { | ||
// The jsdom instance is shared across test cases in a single file so reset the DOM | ||
while (document.body.firstChild) { | ||
document.body.removeChild(document.body.firstChild); | ||
} | ||
}); | ||
|
||
it('is accessible', async () => { | ||
const element = createElement('c-stylesheets', { | ||
is: Stylesheets | ||
}); | ||
document.body.appendChild(element); | ||
|
||
// Check accessibility | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.card-body { | ||
background-color: yellow; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<lightning-card title="Stylesheets" icon-name="custom:custom3"> | ||
<div class="card-body"> | ||
<p class="fancy-text">This is a paragraph with style!</p> | ||
</div> | ||
<c-view-source source="lwc/stylesheets" slot="footer"> | ||
Add additional stylesheets scoped to your component. | ||
</c-view-source> | ||
</lightning-card> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { LightningElement } from 'lwc'; | ||
import textStyles from './text-styles.css'; | ||
|
||
export default class Stylesheets extends LightningElement { | ||
static stylesheets = [textStyles]; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.fancy-text { | ||
color: #d54d7b; | ||
font-family: 'Great Vibes', cursive; | ||
font-weight: normal; | ||
text-align: center; | ||
text-shadow: 0 1px 1px #fff; | ||
} |
21 changes: 21 additions & 0 deletions
21
force-app/main/default/lwc/stylingHooks/__tests__/stylingHooks.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { createElement } from 'lwc'; | ||
import StylingHooks from 'c/stylingHooks'; | ||
|
||
describe('c-misc-stylesheets', () => { | ||
afterEach(() => { | ||
// The jsdom instance is shared across test cases in a single file so reset the DOM | ||
while (document.body.firstChild) { | ||
document.body.removeChild(document.body.firstChild); | ||
} | ||
}); | ||
|
||
it('is accessible', async () => { | ||
const element = createElement('c-styling-hooks', { | ||
is: StylingHooks | ||
}); | ||
document.body.appendChild(element); | ||
|
||
// Check accessibility | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class StylingHooks extends LightningElement {} |
10 changes: 10 additions & 0 deletions
10
force-app/main/default/lwc/stylingHooks/stylingHooks.js-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>59.0</apiVersion> | ||
<isExposed>true</isExposed> | ||
<targets> | ||
<target>lightning__AppPage</target> | ||
<target>lightning__RecordPage</target> | ||
<target>lightning__HomePage</target> | ||
</targets> | ||
</LightningComponentBundle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<description>Created by Lightning App Builder</description> | ||
<flexiPage>Styling</flexiPage> | ||
<label>Styling</label> | ||
<motif>Custom86: Red Cross</motif> | ||
</CustomTab> |