Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep doc-string order for shape or exact props #2994

Merged
merged 7 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from 'react';
import PropTypes from 'prop-types';

const ShapeOrExactKeepOrderComponent = (props) => {
const { id } = props;

return (
<div id={id} />
);
}
ShapeOrExactKeepOrderComponent.propTypes = {
id: PropTypes.string,
/**
* test prop for shape
*/
shape_test_prop: PropTypes.shape({
/**
* z
*/
z: PropTypes.string,
/**
* a
*/
a: PropTypes.string,
/**
* y
*/
y: PropTypes.string
}),
/**
* test prop for exact
*/
exact_test_prop: PropTypes.exact({
/**
* z
*/
z: PropTypes.string,
/**
* a
*/
a: PropTypes.string,
/**
* y
*/
y: PropTypes.string
}),
}

export default ShapeOrExactKeepOrderComponent;
T4rk1n marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 3 additions & 1 deletion @plotly/dash-test-components/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import ComponentAsProp from './components/ComponentAsProp';
import DrawCounter from './components/DrawCounter';
import AddPropsComponent from "./components/AddPropsComponent";
import ReceivePropsComponent from "./components/ReceivePropsComponent";
import ShapeOrExactKeepOrderComponent from "./components/ShapeOrExactKeepOrderComponent";


export {
Expand All @@ -25,5 +26,6 @@ export {
ComponentAsProp,
DrawCounter,
AddPropsComponent,
ReceivePropsComponent
ReceivePropsComponent,
ShapeOrExactKeepOrderComponent
};
2 changes: 1 addition & 1 deletion dash/development/_py_components_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def shape_or_exact():
default=prop.get("defaultValue"),
indent_num=indent_num + 2,
)
for prop_name, prop in sorted(list(type_object["value"].items()))
for prop_name, prop in list(type_object["value"].items())
T4rk1n marked this conversation as resolved.
Show resolved Hide resolved
)

def array_of():
Expand Down