Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions js/ProgressView.windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const styles = StyleSheet.create({

export default function ProgressViewWindows(props: WindowsNativeProps) {
const nativeProps = {
accessibilityLabel: props.accessibilityLabel,
testID: props.testID,
progressViewStyle: props.progressViewStyle,
progress: props.progress,
Expand Down
2 changes: 2 additions & 0 deletions js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ export type ProgressViewProps = ViewProps & {
* A stretchable image to display behind the progress bar.
*/
trackImage?: ImageSourcePropType,

accessibilityLabel?: String,
};
export class ProgressView extends React.Component<ProgressViewProps> {}
5 changes: 5 additions & 0 deletions windows/progress-view/ProgressViewView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ namespace winrt::progress_view::implementation {
else if (propertyName == "isIndeterminate") {
this->IsIndeterminate(propertyValue.AsBoolean());
}
else if (propertyName == "accessibilityLabel") {
if (!propertyValue.IsNull()) {
this->Name(to_hstring(propertyValue.AsString()));
}
}
else if (propertyName == "progressImage") {
if (!propertyValue.IsNull()) {
auto imgUriString = propertyValue.AsObject()["uri"].AsString();
Expand Down
1 change: 1 addition & 0 deletions windows/progress-view/ProgressViewViewManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace winrt::progress_view::implementation {
// IViewManagerWithNativeProperties
IMapView<hstring, ViewManagerPropertyType> ProgressViewViewManager::NativeProps() noexcept {
auto nativeProps = winrt::single_threaded_map<hstring, ViewManagerPropertyType>();
nativeProps.Insert(L"accessibilityLabel", ViewManagerPropertyType::String);
nativeProps.Insert(L"progress", ViewManagerPropertyType::Number);
nativeProps.Insert(L"progressTintColor", ViewManagerPropertyType::Color);
nativeProps.Insert(L"trackTintColor", ViewManagerPropertyType::Color);
Expand Down