OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" |
| 11 #import "ios/third_party/material_components_ios/src/components/CollectionCells/
src/MaterialCollectionCells.h" |
| 12 |
| 13 // TextAndErrorItem: Displays a text label and might containg an accessory type. |
| 14 // It might also display an error icon at the right side of the cell if the |
| 15 // shouldDisplayError flag is set to true. |
| 16 @interface TextAndErrorItem : CollectionViewItem |
| 17 |
| 18 // Item text. |
| 19 @property(nonatomic, copy) NSString* text; |
| 20 |
| 21 // Boolean to display or hide the error icon. |
| 22 @property(nonatomic, assign) BOOL shouldDisplayError; |
| 23 |
| 24 // The accessory type for the represented cell. |
| 25 @property(nonatomic) MDCCollectionViewCellAccessoryType accessoryType; |
| 26 |
| 27 // Whether or not the item is enabled. |
| 28 @property(nonatomic, assign, getter=isEnabled) BOOL enabled; |
| 29 |
| 30 @end |
| 31 |
| 32 @interface TextAndErrorCell : MDCCollectionViewCell |
| 33 |
| 34 // Cell title. |
| 35 @property(nonatomic, readonly, strong) UILabel* textLabel; |
| 36 |
| 37 // Error icon that will be displayed on the right side of the cell. |
| 38 @property(nonatomic, readonly, strong) UIImageView* errorIcon; |
| 39 |
| 40 @end |
| 41 |
| 42 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_ |
OLD | NEW |