Skip to content

Commit 3761dca

Browse files
authored
Merge pull request #184 from alioguzhan/183-is-this-one-missing-or-something
feat: add `buttonsContainerProps`
2 parents 0bdbd44 + 4dffdf2 commit 3761dca

File tree

13 files changed

+78
-12
lines changed

13 files changed

+78
-12
lines changed

.github/workflows/npmtest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
test:
13-
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
13+
name: Test on node ${{ matrix.node }} and ${{ matrix.os }}
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ There is also a codesandbox template that you can fork and play with it:
5757

5858
[![StackBlitz](https://img.shields.io/badge/StackBlitz-Edit-blue?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAABECAYAAAD+1gcLAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AINBw4X0bTGRQAABSxJREFUaN7VmVtsFFUYx//fmQW79bbd2QKpaIIaDcGoifFBEgMGqTTRRA01SgxE5Rbi7QG6S3lgo9J2twpeotxEQlCigLdoQwJ4ARN9QB9MRCNRDBdRzE7LJbTSmTl/H4BYStmd2Z3tDOdt5lzml/9833fO9x0gYi2xgom6Tt5aapyKEnRDlrVGPzfGT+G3SwZ87HLGT8f5uYD7jmSl99IAX80RfTY3A5wMqDVepoQPnqVKHtMbAN4PyJeFtPwafXBSknG9UoDHAIDQq7xODRU8mdc5Aeaeffy7O2F8GnnwZM5dKsCic88CrMU8sSMNbubdZwTIDnjlOoZa52eNYQc3c84sEK+d/1a6ji2UA5EFN3POw4C8fcYy/m+a3p1y2MGTOXsqIJsAxAZ1Hei53tgeSfBkBycK1McALrswJGIVHhE3cuD1ed4uorsAXD5Ed7/hqvXlrFtV8LpO3qKpdwJIDLn/AB/+s0SORgp8VJ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zVuEyEDb4z7NTndysju4c6qfSlOOc8pXQof78nEtoVRDvDsnMlXeK04+o+ztRgSnNOdjq1DSM2z4uLoeecKSCQWhgntXfEsY2ZcHwDQAMESq8VoC7ty5EnxZK37EIAGAV6NArT3c3def2Hm3HdASlSYSipe384bAR6x+tTsIBOBqoMTzlirVz2BrOgoWcF/mizikfkwKiQAAAAASUVORK5CYII=)](https://stackblitz.com/edit/react-editext?file=src%2FApp.tsx)
5959

60-
6160
You can customize almost everything based on your needs. Please navigate to [Props](#Props) section. I mean, just scroll down.
6261

6362
## Props
@@ -71,6 +70,7 @@ You can customize almost everything based on your needs. Please navigate to [Pro
7170
| inputProps | object | No | | Props to be passed to input element. Any kind of valid DOM attributes are welcome. |
7271
| viewProps | object | No | | Props to be passed to div element that shows the text. You can specify your own `styles` or `className` |
7372
| containerProps | object | No | | Props to be passed to div element that is container for all elements. You can use this if you want to style or select the whole container. |
73+
| buttonsContainerProps | object | No | | Props to be passed to div element that contains action buttons. You can use this if you want to style or select the buttons container. |
7474
| editButtonProps | object | No | | Props to be passed to edit button. |
7575
| validation | function | No | | Pass your own validation function. takes one param -> `value`. It must return `true` or `false` |
7676
| validationMessage | node | No | Invalid Value | If validation fails this message will appear |

dist/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export interface EdiTextProps {
2727
* You can use this if you want to style or select the whole container.
2828
*/
2929
containerProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
30+
/**
31+
* Props to be passed to div element that is container for buttons.
32+
* You can use this if you want to style or select the buttons container.
33+
*/
34+
buttonsContainerProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
3035
/**
3136
* Value of the content [in view mode] and input [in edit mode]
3237
*/

dist/index.es.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/src/App.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ export default function App() {
468468
</a>
469469
</div>
470470
<p className="content">
471-
You can use your own classes for main, edit and view containers.
471+
You can use your own classes for main, edit, buttons, and view
472+
containers.
472473
</p>
473474
<p className="content">
474475
<code>viewContainerClassName</code> and{' '}
@@ -496,6 +497,9 @@ export default function App() {
496497
inputProps={{
497498
rows: 5
498499
}}
500+
buttonsContainerProps={{
501+
className: 'my-custom-buttons-wrapper'
502+
}}
499503
saveButtonContent="Apply"
500504
cancelButtonContent={<strong>Cancel</strong>}
501505
editButtonContent="Edit This Quote"

0 commit comments

Comments
 (0)