-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9e14d7
commit de77904
Showing
13 changed files
with
134 additions
and
133 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
21 changes: 21 additions & 0 deletions
21
packages/web-components/src/anchor-button/anchor-button.definition.ts
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 { FluentDesignSystem } from '../fluent-design-system.js'; | ||
import { AnchorButton } from './anchor-button.js'; | ||
import { styles } from './anchor-button.styles.js'; | ||
import { template } from './anchor-button.template.js'; | ||
|
||
/** | ||
* The Fluent Anchor Button Element. Implements {@link @microsoft/fast-foundation#Anchor }, | ||
* {@link @microsoft/fast-foundation#anchorTemplate} | ||
* | ||
* @public | ||
* @remarks | ||
* HTML Element: \<fluent-anchor-button\> | ||
*/ | ||
export const definition = AnchorButton.compose({ | ||
name: `${FluentDesignSystem.prefix}-anchor-button`, | ||
template, | ||
styles, | ||
shadowOptions: { | ||
delegatesFocus: true, | ||
}, | ||
}); |
40 changes: 40 additions & 0 deletions
40
packages/web-components/src/anchor-button/anchor-button.options.ts
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,40 @@ | ||
import { AnchorOptions, ValuesOf } from '@microsoft/fast-foundation'; | ||
import { ButtonAppearance, ButtonShape, ButtonSize } from '../button/button.options.js'; | ||
|
||
/** | ||
* Anchor Button Appearance constants | ||
* @public | ||
*/ | ||
export const AnchorButtonAppearance = ButtonAppearance; | ||
|
||
/** | ||
* An Anchor Button can be secondary, primary, outline, subtle, transparent | ||
* @public | ||
*/ | ||
export type AnchorButtonAppearance = ValuesOf<typeof AnchorButtonAppearance>; | ||
|
||
/** | ||
* An Anchor Button can be square, circular or rounded. | ||
* @public | ||
*/ | ||
export const AnchorButtonShape = ButtonShape; | ||
|
||
/** | ||
* An Anchor Button can be square, circular or rounded | ||
* @public | ||
*/ | ||
export type AnchorButtonShape = ValuesOf<typeof AnchorButtonShape>; | ||
|
||
/** | ||
* An Anchor Button can be a size of small, medium or large. | ||
* @public | ||
*/ | ||
export const AnchorButtonSize = ButtonSize; | ||
|
||
/** | ||
* An Anchor Button can be on of several preset sizes. | ||
* @public | ||
*/ | ||
export type AnchorButtonSize = ValuesOf<typeof AnchorButtonSize>; | ||
|
||
export { AnchorOptions as AnchorButtonOptions }; |
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
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...-components/src/anchor/anchor.template.ts → ...c/anchor-button/anchor-button.template.ts
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { ElementViewTemplate } from '@microsoft/fast-element'; | ||
import { anchorTemplate } from '@microsoft/fast-foundation'; | ||
import type { Anchor } from './anchor.js'; | ||
import type { AnchorButton } from './anchor-button.js'; | ||
|
||
/** | ||
* The template for the Button component. | ||
* @public | ||
*/ | ||
export const template: ElementViewTemplate<Anchor> = anchorTemplate(); | ||
export const template: ElementViewTemplate<AnchorButton> = anchorTemplate(); |
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
2 changes: 1 addition & 1 deletion
2
packages/web-components/src/anchor/define.ts → ...eb-components/src/anchor-button/define.ts
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { FluentDesignSystem } from '../fluent-design-system.js'; | ||
import { definition } from './anchor.definition.js'; | ||
import { definition } from './anchor-button.definition.js'; | ||
|
||
definition.define(FluentDesignSystem.registry); |
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,4 @@ | ||
export * from './anchor-button.js'; | ||
export * from './anchor-button.options.js'; | ||
export { template as AnchorButtonTemplate } from './anchor-button.template.js'; | ||
export { definition as AnchorButtonDefinition } from './anchor-button.definition.js'; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.