-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/customfunction
- Loading branch information
Showing
40 changed files
with
177 additions
and
865 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
37 changes: 37 additions & 0 deletions
37
Composer/packages/adaptive-form/src/components/AddButton.tsx
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,37 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import React from 'react'; | ||
import styled from '@emotion/styled'; | ||
import { ActionButton, IButtonStyles } from 'office-ui-fabric-react/lib/components/Button'; | ||
import { FluentTheme } from '@uifabric/fluent-theme'; | ||
import formatMessage from 'format-message'; | ||
|
||
export const ButtonContainer = styled.div({ | ||
borderTop: `1px solid ${FluentTheme.palette.neutralLight}`, | ||
width: '100%', | ||
}); | ||
|
||
export const actionButtonStyles: IButtonStyles = { | ||
root: { | ||
fontSize: FluentTheme.fonts.small.fontSize, | ||
fontWeight: FluentTheme.fonts.small.fontWeight, | ||
color: FluentTheme.palette.themePrimary, | ||
paddingLeft: 8, | ||
height: 20, | ||
}, | ||
}; | ||
|
||
type Props = { | ||
onClick: () => void; | ||
}; | ||
|
||
export const AddButton = ({ children, onClick }: React.PropsWithChildren<Props>) => { | ||
return ( | ||
<ButtonContainer> | ||
<ActionButton styles={actionButtonStyles} onClick={onClick}> | ||
{children ?? formatMessage('Add new')} | ||
</ActionButton> | ||
</ButtonContainer> | ||
); | ||
}; |
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
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
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
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
Oops, something went wrong.